TSG Global API Documentation
  • Get Started
  • ISO/IEC/SOC Certification
  • Staging Environment Access
  • API Reference
    • Programmable SMS
      • Send an SMS Message
      • Receive an SMS Message
      • Delivery Receipts (DLRs)
      • SMPP
        • Headers
        • Errors
    • Programmable MMS
      • Send an MMS Message
      • Receive an MMS Message
      • Receive DLRs
      • SMTP
    • Phone Numbers
      • Search For New Available Numbers
      • Add Number to Cart
      • Get Reserved Numbers In Cart
      • Remove Reserved Number From Cart
      • Checkout Numbers in Cart
      • Disconnect Number
      • Get Number Information
      • Manage Number for SMS & 10DLC
        • Enable SMS/10DLC on a Number
        • Disable SMS on a Number
        • Update inbound SMS webhook/URI
      • Manage Number for MMS
        • Enable MMS on a Number
        • Disable MMS on a Number
        • Update inbound MMS webhook/URI
      • Manage Number for Voice
        • List Destination Priority
        • Add Destination Priority
        • Update Destination Priority
        • Delete Destination Priority
      • Protect your phone number
        • TextProtect Webhook
      • Toll-free phone numbers - search & ordering
    • Data Services
      • CNAM Lookup
      • Lookup SMS Carrier
    • Reports
      • CDR Records
        • Get Count of CDR Records
        • Get CDR Records
    • Compliance & Identity
      • Business Identity & 10DLC (TNID v1)
      • Toll-Free Verified Sender (Order)
      • Short Code Submission (Order)
  • GraphQL API & Authentication
Powered by GitBook
On this page
  • Overview
  • Authentication
  • Available MM4 Endpoints
  • MM4 Commands
  • MM4 Exchange Example

Was this helpful?

  1. API Reference
  2. Programmable MMS

SMTP

Overview

It is possible to send MMS messages via SMTP using the MM4 services instead of the HTTP API.

Authentication

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

Available MM4 Endpoints

TCP

  • mmsc.tsgglobal.world:2525

TLS/SSL

  • mmsc.tsgglobal.world:2465

It is recommended to utilize the TLS port when capable. TLS supports versions 1.1 and 1.2.

MM4 Commands

  • AUTH - Mandatory

  • DATA - Mandatory

  • EHLO - Mandatory

  • HELO - Available

  • MAIL - Mandatory

  • NOOP - Available, use to test if the connection is working

  • QUIT - Available, optional, closing the connection also works

  • RCPT - Mandatory

  • RSET - Available

  • STARTTLS - Disabled, use the TLS port instead

  • VRFY - Unimplemented, and would be disabled

MM4 Exchange Example

All lines must end with a CRLF. Some data has been omitted for brevity.

Note, arrows > < have been included in the example to denote origin of message.

  • > Is a response from the server

  • < Is input from the client

#
< NOOP
> 250 OK
< EHLO your_hostname
> MM4 server babble
< AUTH LOGIN
> 334 VXNlcm5hbWU6
< base64-encoded-system-id
> 334 UGFzc3dvcmQ6
< base64-encoded-api-key
> 235 Authentication successful
< MAIL FROM:<E164-number@hostname>
> 250 Sender OK
< RCPT TO:<E164-number@hostname>
> 250 Recipient OK
< DATA
> 354 enter mail, end with line containing only '.'
< your-mms-content-here
< .
> 250 queued as <message-id>
< QUIT
> 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

PreviousReceive DLRsNextPhone Numbers

Last updated 2 years ago

Was this helpful?