Before submitting a message via MM7, a VASP (Value Added Service Provider) account must be defined to the Now SMS & MMS Gateway. This account is defined on the “MMSC VASP” configuration dialog.
To post to the Now SMS & MMS Gateway via MM7, you must connect to the HTTP port configured for the MMSC on the “MMSC” configuration dialog. And you must perform an HTTP POST of the MM7 content to a URI of “/mm7”, which is how the gateway knows that the VASP intends to submit in the MM7 format.
Optionally the URI can include the account name and password of the “MMSC VASP” using the format “/mm7/account=password”.
The HTTP headers of your POST must include a “Content-length:” header. If the VASP account name is not included in the URI, the request must either include an “Authorization:” header for Basic authentication using the account name and password configured for the account, or it must originate from an IP address that matches the name configured for the VASP account. (If your software cannot generate an “Authorization:” header, it is possible to configure the account name for the VASP as an IP address, and in this case, the MMSC will recognise any connections from that IP address as being for this VASP account.)
The “Content-type:” header in the POST should be one of the “multipart” types (usually “multipart/related”), and should include a “boundary=” parameter that delimits the different parts of the message.
The first part of the multipart message is expected to be the XML for the MM7 request, and we’re going to expect to see a <Recipients> section with at least one <To>, <Cc> or <Bcc> recipient specified.
The second part of the multipart message is expected to be the content for the MMS message, and this in turn will usually be another MIME multipart structure.
The following example is adapted from the official MM7 specification that is included in the 3GPP TS 23.140 specification:
Note that this example does not include a SMIL file, and as part of the MMS content, you would probably want to include a SMIL file (application/smil), which this example does not include.
Also note that the MM7 XML portion of the document (the first part of the main multipart content) should not use any Content-Transfer-Encoding, it should always be expressed without any encoding. For the portion of the document that includes the MMS content itself, you can use Content-Transfer-Encoding of either quoted-printable or base64, or no encoding can be specified in which case it is assumed that the binary data is to be included as is.
POST /mm7 HTTP/1.1
Content-Type: multipart/related; boundary="NextPart_000_0028_01C19839.84698430"; type=text/xml; start="</tnn-200102/mm7-submit>"
<?xml version="1.0" ?>
<mm7:TransactionID xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3" env:mustUnderstand="1">
<Subject>News for today</Subject>
<Content href="cid:SaturnPicsfirstname.lastname@example.org" allowAdaptations="true"/>
Content-Type: multipart/mixed; boundary="StoryParts-74526-8432-2002-77645"
Content-Type: text/plain; charset="us-ascii"
Science news, new Saturn pictures...