Appendix B. EmailSend Using the Gmail™ Outgoing SMTP Server
B-3
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
BeginProg
Scan
(1,Sec,3,0)
Battery
(Batt)
PanelTemp
(RefTemp,250)
TCDiff
(Temp,1,mV200C,U1,TypeT,RefTemp,True ,0,250,1.0,0)
CallTable
TenSecData
NextScan
SlowSequence
Do
Delay
(1,1,Sec)
'Approximately every 1 second, check for an email alarm condition
'If the temperature has transitioned from below 27 degC to
'to above 28 degC, send an email alarm message
If
AlarmTrigger
=
False
Then
If
Temp
>
28
Then
AlarmTrigger
=
True
If
AlarmTrigger
Then
'Create email message body
Message = "Warning!" & CRLF & CRLF
Message = Message & "An alarm condition has been identified. "
Message = Message & "The temperature is " & Temp & " degrees C." & CRLF & CRLF
Message = Message & "Datalogger time is " & Status.Timestamp
'Attempt to send the email message
EmailResult=EmailSend
(ServerAddr,ToAddr,FromAddr,Subject,Message,Attach,UserName,Password,EmailServerResp)
CallTable
EmailLog
EndIf
EndIf
If
Temp
<
27
Then
AlarmTrigger
=
False
Loop
EndProg
Содержание RV50
Страница 2: ......
Страница 6: ......
Страница 38: ...Appendix B EmailSend Using the Gmail Outgoing SMTP Server B 4 ...
Страница 41: ...Appendix C Configuring the RV50 for Dynamic IP C 3 FIGURE C 1 Serial Server Mode with Dynamic IP ...
Страница 42: ...Appendix C Configuring the RV50 for Dynamic IP C 4 ...
Страница 47: ...Appendix E Regulatory Information E 3 E 5 RoHS Compliance ...
Страница 48: ...Appendix E Regulatory Information E 4 ...
Страница 49: ......