Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

EmailRecv() and Gmail (Google)


GaryTRoberts Mar 21, 2014 09:25 PM

Just a quick heads up for customers using the EmailRecv() instruction with Gmail.

Google has shortened the window in which we need to respond when doing POP and TLS communications. The datalogger (CR3000, CR1000, and CR8X0) cannot completely process the TLS certificates and respond before Google's POP server times out. This means the logger is no longer able to receive emails from Gmail.

EmailSend() is not affected by this change.

As a workaround to Gmail, you can use Yahoo's free email service.

The appropriate settings for using Yahoo email can be found in the example program below:


Const POPServerAddr = "pop.mail.yahoo.com:995"
Const SMTPServerAddr = "smtp.mail.yahoo.com:587"
Const ToFilter = "your_address@yahoo.com"
Const FromFilter = "your_address@yahoo.com"
Const Subject = "Hello"
Const SubjFltr = "Hello"
Const UserName = "your_address@yahoo.com"
Const Password = "your_Good_Pa$$word"
Const ToAddr = "your_address@yahoo.com"
Const FromAddr = "your_address@yahoo.com"
Public ResultRCV As String * 50
Public ResultSend As String * 50
Public MessageRCVD As String * 100
Public TextString As String * 30
Public EmailSuccessTx As Boolean, EmailSuccessRx As Boolean
Public PastTx

BeginProg
EmailSuccessTx = EMailSend(SMTPServerAddr,ToAddr,FromAddr,Subject,"Text of email sent","",UserName,Password,ResultSend)
PastTx = PastTx + 1

Delay (1,500,mSec)

EmailSuccessRx = EmailRecv (POPServerAddr,ToFilter,FromFilter,SubjFltr,MessageRCVD,"TLS",UserName,Password,ResultRCV)
TextString = Left(MessageRCVD,18)

EndProg

Log in or register to post/reply in the forum.