How to send an MMS using the HTTP API

To send a picture message, first you must upload your pictures to the SMS server's hard disk. For example C:\1.gif and C:\2.gif can be created on the SMS servers' C: driver.

To send the message you should use the following message type:

Message type: MMS:XML 

To send the message you should use the XML format defined in the MMS XML section of the Ozeki Mobile Message Type Specification.

Message data:

<MMS>
   <subject>This is my MMS subject</subject>
   <messagetext>Hello world</messagetext>
   <deliveryreport>on</deliveryreport>
   <readreport>on</readreport>
   <priority>high</priority>
   <messageclass>personal</messageclass>
   <attachments>
      <attachment>
          <filename>c:\1.gif</filename>
      </attachment>
      <attachment>
          <filename>c:\2.gif</filename>
      </attachment>
   </attachments>
</MMS>

To send this message in an HTTP request, you should urlencode the message data and use the following HTTP URL:

http://127.0.0.1:9501/api?action=sendmessage&username=httpserverusr1&password=pass1&
recipient=06203105366&messagetype=MMS:XML&messagedata=%3CMMS%3E%0D%0A+++
%3Csubject%3EThis+is+my+MMS+subject%3C%2Fsubject%3E%0D%0A+++%3Cmessagetext%3EHello+world%3C%2
Fmessagetext%3E%0D%0A+++%3Cdeliveryreport%3Eon%3C%2Fdeliveryreport%3E%0D%0A+++%3Creadreport%3Eon
%3C%2Freadreport%3E%0D%0A+++%3Cpriority%3Ehigh%3C%2Fpriority%3E%0D%0A+++%3Cmessageclass%3Epersonal
%3C%2Fmessageclass%3E%0D%0A+++%3Cattachments%3E%0D%0A++++++%3Cattachment%3E%0D%0A++++++++++%3Cfile
name%3Ec%3A%5C1.gif%3C%2Ffilename%3E%0D%0A++++++%3C%2Fattachment%3E%0D%0A++++++%3Cattachment%3E%0D%0
A++++++++++%3Cfilename%3Ec%3A%5C2.gif%3C%2Ffilename%3E%0D%0A++++++%3C%2Fattachment%3E%0D%0A+++%3C%2F
attachments%3E%0D%0A%3C%2FMMS%3E

More information