Hello All,
I currently have a CR1000 with a NIL120. I am trying to send an email with the datalogger through Gmail with no luck. Here is the email portion of my code:
Public AlreadySent As String * 63
Public SendEmail As Boolean
Const EmailHost = "smtp.gmail.com:587"
Const EmailUser = "user@gmail.com"
Const EmailPass = "Password"
SlowSequence
Scan(10,Min,0,0)
SendEmail = EMailSend (EmailHost,EmailUser,EmailUser,"Test","Test","",EmailUser,EmailPass,EmailSent)
NextScan
EndSequence
I only want to email it once every 10 minutes. Every time I run it. EmailSent returns a string saying error email cannot send. I have TLS encryption enabled for the datalogger and I am quite loss on how to troubleshoot this problem.
Edit: I am also using the Datalogger as a Modbus Slave over TCP if that effects anything. I just want the email as backup for data in case any computer goes down.
* Last updated by: Delber on 6/21/2011 @ 9:19 AM *
Apart from the other possibilities can you confirm the logger has both DNS server entries and a gateway setup to access the outside world. These either need to be set manually or assigned via DHCP.
Thanks for the reply aps. I completely forgot to enter the DNS server information. Everything now works great.