It is possible to send MMS messages via SMTP using the MM4 services instead of the HTTP API.
MM4 servers support PLAIN and LOGIN AUTH mechanism.
Use the provided SMPP system_id as the username, and the API Key as the password.
System IDs are normally 15 characters in length
It is recommended to utilize the TLS port when capable. TLS supports versions 1.1 and 1.2.
NOOP- Available, use to test if the connection is working
QUIT- Available, optional, closing the connection also works
STARTTLS- Disabled, use the TLS port instead
VRFY- Unimplemented, and would be disabled
All lines must end with a
CRLF. Some data has been omitted for brevity.
> <have been included in the example to denote origin of message.
>Is a response from the server
<Is input from the client
> 250 OK
< EHLO your_hostname
> MM4 server babble
< AUTH LOGIN
> 334 VXNlcm5hbWU6
> 334 UGFzc3dvcmQ6
> 235 Authentication successful
< MAIL FROM:<[email protected]>
> 250 Sender OK
< RCPT TO:<[email protected]>
> 250 Recipient OK
> 354 enter mail, end with line containing only '.'
> 250 queued as <message-id>
> 221 BYE
Note the order of the commands:
- AUTH must be used before MAIL and RCPT.
- RCPT can only be used after a MAIL command.
- DATA can only be used after a MAIL and RCPT commands.
- QUIT, NOOP can be used at anytime (except while entering mail.)
Failure to do so will result in various errors
# AUTH before HELO
503 ERROR: send EHLO first
# RCPT or MAIL before EHLO
503 ERROR: send EHLO or HELO first
# RCPT before MAIL
503 ERROR: send MAIL first
# DATA before MAIL
503 ERROR: need MAIL command
# DATA before RCPT
503 ERROR: need RCPT command