Before submitting a message via MM4, 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 NowSMS MMSC via MM4, your application is making an SMTP connection to the MMSC, and you would connect to the “SMTP Port Number” that is configured on the “MMSC” configuration dialog.
To submit a message via MM4, the VASP must authenticate via SMTP using the “AUTH LOGIN” approach, or similar to the way it works for MM7, the VASP account can be created with an IP address as the “Account Name”, and in that case any connection from that IP will be accepted as being a connection from that VASP account.
“AUTH LOGIN” is rather simple. Basically, as part of the SMTP dialog, after the initial HELO or EHLO command, the SMTP client needs to issue the command AUTH LOGIN. The SMTP server responds with a “300″ series code and prompts for the account name (the prompt after the code is a BASE64 encoded string). The client sends the account name as a BASE64 encoded string. The SMTP server responds with another “300″ series code prompting for the password, and the client responds with the password as a BASE64 encoded string. A “200″ series response indicates that the authentication was accepted, a “500″ series response indicates that it was not.
The SMTP dialog then continues as normal, generally with a “MAIL FROM:” command from the client indicating the sending address of the message, followed by one or more “RCPT TO:” commands to indicate the recipients for the message. Note that NowSMS expects the “RCPT TO:” addresses to be in a format of email@example.com or phonenumber/TYPE=PLMN@domain.name, where “domain.name” is the “Domain Name for MMS E-Mail” configured on the “MMSC” configuration dialog. (The “Local Host Name or IP Address” value is also acceptable here.) If the domain name is not present, the MMSC will reject the recipient. As special support for Multimedia WAP Push, the following address formats are also supported to specify Multimedia WAP Push to be used for sending to the phone number: firstname.lastname@example.org or phonenumber/TYPE=WAPP@domain.name.
The actual MMS message is then transmitted via the “DATA” command. Normally an MMS message would be a multipart MIME message with multiple content parts, although NowSMS will also accept a message that includes only a single part.
The MM4/SMTP dialog looks something like this:
The dialog looks something like this (IN means from server, OUT means from client):
IN: 220 SMTP Ready
OUT: HELO client.name (or EHLO client.name)
IN: 250 OK (or a multiline response if EHLO was used)
OUT: AUTH LOGIN
IN: 334 VXNlcm5hbWU6
("Username:" BASE64 encoded)
("test" BASE64 encoded)
IN: 334 UGFzc3dvcmQ6
("Password:" BASE64 encoded)
("test" BASE64 encoded)
IN: 235 Ok
OUT: MAIL FROM: <email@example.com>
IN: 250 Ok
OUT: RCPT TO: <+447778889999/TYPE=PLMN@mms.domain.com>
IN: 250 Ok
IN: 354 Ok, end with "." on a new line...
OUT: (Transmit MIME encoded message, then end with a line with only the . character)
IN: 250 Message Accepted
Using the example data from the MM7 message in the previous section, the MIME encoded message would look something like this:
To: +447778889999/TYPE=PLMN@mms.domain.com From: firstname.lastname@example.org Subject: News for today Content-Type: multipart/mixed; boundary="StoryParts-74526-8432-2002-77645" Content-ID:<SaturnPicsemail@example.com> --StoryParts-74526-8432-2002-77645 Content-Type: text/plain; charset="us-ascii" Science news, new Saturn pictures... --StoryParts-74526-8432-2002-77645 Content-Type: image/gif Content-ID:<saturn.gif> Content-Transfer-Encoding: base64 R0lGODdhZAAwAOMAAAAAAIGJjGltcDE0OOfWo6Ochbi1n1pmcbGojpKbnP/lpW54fBMTE1RYXEFO ... --StoryParts-74526-8432-2002-77645--