How to send an SMS from an email?

Everything you need to know to send an SMS from an email

Setting up Mail-to-SMS

To use Mail to SMS, all you need is an SMS Partner account and an email address. Once you have both of these, you will need to configure your message and write it.

It is important to always include the required fields listed on this documentation page for a successful send.

The order in which the fields appear does not matter when sending a campaign, however it is essential to always enter the fields in the email subject line (except for the message) and to always separate those fields using the “&” character.

Documentation: Mail to SMS

Each email sent must mandatorily contain the following fields…

« apiKey »

The API key for your account. You can retrieve it from your SMS Partner account.

Field example: apiKey=0000000000000000000000

« phoneNumbers »

The recipients’ phone numbers. They must be separated by commas and the limit is 5,000 numbers per email.

They can be:
– in national format (06xxxxxxxx) or international format (+336xxxxxxxx), for French numbers.
– in international format (+496xxxxxxxx), for numbers outside France.

Field example: phoneNumbers=+336xxxxxxxx,06xxxxxxxx,+317xxxxxxxx

message

SMS content, 160 characters maximum (beyond that, an additional SMS will be deducted for every 160-character increment). Please note that certain special and accented characters will be replaced upon sending (see the list).

The message sent in your SMS corresponds to the text that appears in the body of the email.

Email signature: be careful not to leave your automatic signature when sending your email. Indeed, if you forget to insert the closing tag “—-” it will appear in your SMS message.

Messages must be sent in HTML. (Plain text messages do not work).

Email subject example: apiKey=0000000000000000000000&phoneNumbers=06xxxxxxxx,+317xxxxxxxx

Remember that the order in which the fields appear does not matter when sending a campaign, but you must always separate the fields with “&”.

Optional parameters

Emails can be customized by adding one or more of the fields listed below…

« sender »

The sender name of the message. If the sender is left blank, your SMS will be delivered with an operator shortcode as the sender (example: 36xxx).

The number of characters for the sender name must be between 3 and 11 inclusive and must not contain any special characters.

Note: Some mobile phone models do not handle spaces correctly.

Field example: sender=mycompany

« scheduledDeliveryDate »

SMS sending date, in DD/MM/YYYY format. Only set this if you want the SMS to be sent on a scheduled basis.

Field example: scheduledDeliveryDate=16/03/2022

« time »

SMS sending time in 0-24 format, mandatory and only to be used when the scheduledDeliveryDate field is defined.

Field example: scheduledDeliveryDate=16/03/2022&time=19

« minute »

SMS sending minute in 0-55 format (in 5-minute intervals), mandatory and only to be used when the scheduledDeliveryDate field is defined.

Field example: scheduledDeliveryDate=16/03/2022&time=19&minute=35

« isStopSms »

Adds a STOP notice at the end of the SMS (mandatory for sending commercial SMS messages).

Field example: isStopSms

« sandbox »

Use the “sandbox” field followed by “=1” to test SMS sending and enable sandbox mode.

No SMS will be sent and there will be no charges to your account. Test SMS messages will be automatically removed from your send lists every day.

Field example: sandbox=1

« report »

The “report” field followed by “=1” allows you to receive a delivery receipt for each successfully sent SMS.

Note: a delivery receipt will be sent for each recipient who received the SMS, so it is strongly advised to use this field only when you have a very limited number of recipients.

Field example: report=1

Email subject example: apiKey=0000000000000000000000&phoneNumbers=06xxxxxxxx,+317xxxxxxxx&scheduledDeleveryDate=11/02/2022&time=17&minute=05&sender=MyCompany&isStopSms&sandbox=1

Remember that the order in which the fields appear does not matter when sending a campaign, but you must always separate the fields with “&”.

Complete email example

Mail-to-SMS

From: myaddress@mail.fr Your sending address

To: mail2sms@smspartner.fr Always enter this address as the recipient

Subject: apiKey=0000000000000000000000&phoneNumbers=+336xxxxxxxx,06xxxxxxxx,+317xxxxxxxx&sender=EntrepriseA&scheduledDeleveryDate=09/03/2022&time=12&minute=30&isStopSms&sandbox=1&report=1

apiKey and phoneNumbers are mandatory parameters, the parameters have no defined order but must always be separated by “&”.

Body: This is my SMS, written in the body of my email! – – – –

The message must always be written in the body; some special characters will be replaced (see the list). If you have an email signature, make sure to remove it, or end your message with four hyphens “-” without spaces, otherwise it will appear in the SMS.

Would you like more information?

Cas pratique: Informez vos destinataires avec le SMS vocal
Cas pratique: L'assurance Maladie

Cas pratique: Informez vos destinataires avec le SMS vocal

Each message sent can be personalized based on the recipient’s characteristics. The message can therefore include multiple variables…
En savoir plus
Cas pratique: Envoyez un mot de passe grâce au SMS vocal
Cas pratique: PowerPanne

Cas pratique: Envoyez un mot de passe grâce au SMS vocal

Use voice SMS to send validation passwords. Simple and effective, it ensures the ownership of an active line…
En savoir plus
Guide d'utilisation: Comment utiliser le mail-to-SMS ?
Tutoriel vidéo SMS Partner

Guide d'utilisation: Comment utiliser le mail-to-SMS ?

Learn how to send an SMS through our Mail-to-SMS solution with our video tutorial.
En savoir plus