Appendix D. EmailSend Using the Gmail Outgoing SMTP Server
D.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 (
).
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:
Virgin Mobile:
AT&T:
Sprint:
AT&T:
EmailSend Program Example
The following example sends an email message when an alarm condition is
True.
Both the CR1000 and RavenXTG modem must be configured as
PPP as described in Appendix C,
Configuring the RavenXTG Modem for
PPP
. Transport Layer Security (TLS) must be enabled in the datalogger
to use the Gmail mail server.
'Main program variables
Public Batt, RefTemp, Temp
Public Socket AS Long
'declare Email parameter strings (as constants), Message String & Result Variable
Const ServerAddr="smtp.gmail.com:587"
Const UserName="gmail account name"
Const Password="datalogger"
Const ToAddr="[email protected], [email protected]"
Const FromAddr="[email protected]"
Const Subject="Email Message Test"
Const Attach=""
Const CRLF = CHR(13)+CHR(10)
Public Result as String * 100
Public AlarmTrigger As Boolean
Public Message As String * 250
Public EmailSuccess As Boolean
DataTable (TenSecData,True,-1)
DataInterval (0,10,Sec,10)
Sample (1,Batt,FP2)
Sample (1,Temp,FP2)
EndTable
BeginProg
Scan (1,Sec,3,0)
Battery (Batt)
PanelTemp (RefTemp,250)
TCDiff (Temp,1,mV2_5C,1,TypeT,RefTemp,True ,0,250,1.0,0)
CallTable TenSecData
NextScan
SlowSequence
Scan(1,sec,1,0)
If AlarmTrigger = False Then
D-2
Summary of Contents for RavenXT G2212-C
Page 2: ......
Page 32: ...RavenXTG GPRS EDGE Sierra Wireless Cellular Modem 26...
Page 38: ...Appendix C Configuring the RavenXTG Modem for PPP MD 02 PPP C 2...
Page 42: ...Appendix C Configuring the RavenXTG Modem for PPP C 6...
Page 46: ...Appendix D EmailSend Using the Gmail Outgoing SMTP Server D 4...
Page 52: ...Appendix E Troubleshooting Flowchart E 6...
Page 53: ......