Email To SMS Service
Users on your diarybook account can send SMS text messages by simply sending an email. Their email address must belong to a user on your account for the service to recognize them.
Addressing
When sending to mobile phones in the Republic of Ireland, simply start with 08 followed by the rest of the number. For example, to send a text to mobile number 0870000000, send the email to 0870000000@text.diarybook.com
When sending to numbers registered in other countries put the number in international format. For example, to send to mobile number 07800000000 in the UK, send the email to 447800000000@text.diarybook.com
Advanced Settings
Subject Line
The subject line can contain parameters to affect the behavior of the message. A subject line parameter needs to be specified in the following way:
parameterName=parameterValue;
There must not be any spaces and the parameter must end with a semi-colon.
Subject line parameters that can be specified are:
Name | Value | Note |
---|---|---|
restrictSize | Max. Parts | Limits the number of parts to the message |
senderId | Sender’s ID | Specifies which sender ID to use |
Alternatively, your account can be setup to include the subject line in the message of the text message. In this case the first line of the text message will be the subject line itself. Subsequent lines would be the body of the email message.
RestrictSize and Message Length
A single text message is a maximum of 160 characters in length, including spaces. If your email is longer than this your message will be sent as 2 or more texts that are recombined on the recipient’s mobile phone as one message. You are charged for each individual message part.
Read more about SMS Message Parts
You can specify the maximum number of texts the system is to use to send the message. For example to restrict it to 1 text put restrictSize=1; in the subject field (including the semi-colon). With this in the subject field if the email message is greater than 160 characters in length only the first 160 characters will be sent in 1 text message.
Sender Id
When sending a text message diarybook uses the default sender ID set up on your account. If your account has multiple sender IDs you can specify which one to use with a subject line parameter.
For example, if you’re account has SHOP as a sender ID you can put senderId=SHOP; in the subject field (including the semi-colon).
Gateway Keys
For enhanced security we recommend you add an SMTP custom header to each email sent to diarybook’s gateway.
Please Note: Adding an SMTP header does not mean altering the subject or body of the email and therefore does not interfere with the actual text message. The header name is X-IFLOW-GWAY-KEY. The header value depends on the account and wildcard being used.
Below is an example of headers of an email received by our gateway. Note some details are added in transit or by our own system.
MIME-Version: 1.0
From: <user@yourdomain.com>
To: <08xxxxxxx@text.diarybook.com>
Date: Mon, 11 Dec 2017 15:44:49 +0000
Subject: Subject of email
Content-Type: text/plain
Message-ID: <80282b7b-15b6-40bf-8ee1-9908f69bfaec@EXPGPO03.yourserver.com>
x-msw-jemd-newsletter: false
X-RCPT-TO: <08xxxxxxxx@text.diarybook.com>
X-IFLOW-GWAY-KEY: lk_gway_nuwxxx_xxxq89xwuqxx
Return-Path: <user@yourdomain.com>
How to add the header depends on the environment being used. Here are a few examples but most environments have something similar
.NET C#
var mail = new MailMessage();
mail.From = new MailAddress("user@yourdomain.com");
mail.To.Add("08xxxxxxx@text.diarybook.com");
mail.Subject = "Message Subject”;
mail.Headers.Add("X-IFLOW-GWAY-KEY", "lk_gway_nuwxxx_xxxq89xwuqxx");
Rails
class MyMailer < ActionMailer::Base
def welcome
mail to: '08xxxxxxx@text.diarybook.com', # normal mailer stuff
from: 'user@yourdomain.com',
subject: ''
headers['X-IFLOW-GWAY-KEY'] = "lk_gway_nuwxxx_xxxq89xwuqxx"
end
end
PHP and SwiftMailer
$message = Swift_Message::newInstance();
$headers = $message->getHeaders();
$headers->addTextHeader('X-IFLOW-GWAY-KEY', 'lk_gway_nuwktw_bbmq89xwuqcg');