Instruction manual

Appendix B. EmailSend Using the Gmail Outgoing SMTP Server
B.3 Sending a Text Message to a Phone
To send a text message to a phone, the email needs to be converted to a text
message via an email-to-text message gateway. Most cellular providers have
an email-to-text message service for their phone subscribers. To send a text
message to AT&T® Wireless phone subscribers, send an email to the (10 digit
phone number of the person’s phone)@vtext.com (4355551234@vtext.com).
Most text messages are limited to 160 characters, so any email messages
greater than 160 characters will be truncated.
Email-to-Text Message Gateways
T-Mobile: phonenumber@tmomail.net
Virgin Mobile: phonenumber@vmobl.com
AT&T®: phonenumber@txt.att.net
Sprint: phonenumber@messaging.sprintpcs.com
Verizon: phonenumber@vtext.com
B.4 EmailSend Program Example
The following example sends an email message when an alarm condition is
True. Both the CR1000 and LS300G modem must be configured as PPP as
described in Section 7.5, AceManager and Template Files
(p. 16), and Section
7.6, Enabling PPP Mode
(p. 19). Transport Layer Security (TLS) must be
enabled in the datalogger to use the Gmail mail server. (TLS is automatically
enabled in the CR6 and in the CR1000/CR3000/CR800 with OS revision 24 or
later.)
'Main program variables
Public Batt, RefTemp, Temp
'declare Email parameter strings (as constants), Message String & Result Variable
Const ServerAddr="smtp.gmail.com:587"
Const UserName="username@gmail.com"
Const Password="password"
Const ToAddr="datalogger@hotmail.com, 4355551234@vtext.com"
Const FromAddr=UserName
Const Subject="Email Message Test"
Const Attach=""
Const CRLF = CHR(13) & CHR(10)
Public AlarmTrigger As Boolean
Dim Message As String * 250
Public EmailServerResp As String * 50
Public EmailResult
DataTable (TenSecData,True,-1)
DataInterval (0,10,Sec,10)
Sample (1,Batt,FP2)
Sample (1,Temp,FP2)
EndTable
DataTable(EmailLog,True,10)
Sample (1,EmailResult,FP2)
Sample (1,EmailServerResp,String)
Sample (1,Message,String)
EndTable
B-2