CamEra Posted January 30, 2015 Share Posted January 30, 2015 Hi, Thought this was going to be straightforward but I keep getting the same error. My script is (password has been changed but I know I used the correct one) private string TodaysData //while (1) // waituntil(06h + 86400) email.strHost="smtp.gmail.com" email.strUserName="cambridgeponds@gmail.com" email.strPassword="xxx" email.strReplyAddress="cambridgeponds@gmail.com" email.strReplyName="cambridgeponds@gmail.com" email.port = 587 email.strConnectionType = "STARTTLS" email.strSSLProtocol = "TLSv1_2" //email.strTo="g.payne@niwa.co.nz" email.strTo="g.payne@niwa.co.nz" email.strSubject="Daily Data (all m3)" TodaysData= "Sent " + FormatDateTime("%d/%m/%Y %H:%M:%S",systime()) + " NZST" + Chr(10) + Chr(13) //TodaysData= TodaysData + "HRAP1InFlow HRAP2InFlow Inoculum1InFlow Innoculum2InFlow HRAP1OutFlow HRAP2OutFlow FinalOutFlow" + Chr(10) + Chr(13) //TodaysData= TodaysData + HRAP1InFlowDay[0] +" " +HRAP2InflowDay[0] +" "+HRAP3InFlowDAY[0] + "+HRAP4InFlowDay[0] +" "+ HRAP1OutFlowDay[0] +" "+ HRAP2OutFlowDay[0] +" "+ HRAPFinalOutFlowDay[0] + Chr(10) +Chr(13) email.strBody=TodaysData Email.Send() //endwhile I realise that once working I can take all the settings and set once in the startup script. The error I get is 01/30/15 11:54:12.750 An error occured sending the message, Error:80040207 Description:Unexpected MAIL FROM response, Last Response: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 r1sm8815902pdp.83 - gsmtp Any ideas? Thanks George Link to comment Share on other sites More sharing options...
AzeoTech Posted January 30, 2015 Share Posted January 30, 2015 You forgot to set the Authentication type. It defaults to none, and gmail requires authentication. So, add: email.strAuthenticate = "Auto" and it will likely work correctly for you. Link to comment Share on other sites More sharing options...
CamEra Posted January 31, 2015 Author Share Posted January 31, 2015 Hi, Thanks for the quick response, set that but then got the error below. I logged on using Chrome and set my email account to use the less secure options and made sure that the login process was NOT a two step process. Made several attempts and got the same response. Any ideas? Thanks George 01/31/15 20:51:18.844 An error occured sending the message, Error:80040211 Description:Unexpected AUTH LOGIN password response, Last Response: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvQs 534-5.7.14 UzINkCjj7yv3SsuTA1HAIHo2DBvbOTEUj2ALJVuTB6YFFIB8_b-4NIPE0aB_eec1uqfspF 534-5.7.14 cJC0kkCyWPk8pcze6ilRZ0jnqZD8jNerm4Bz-hwmmlMf8Li-GH7bkk67txPdU3wckdaHTh 534-5.7.14 6IoauO9D_8Y8_BxCMdcjoTlOKHVTeFuNxhjJhT8MRYgPqpzWOC2uIDFqPgo0ccZktdEcIa 534-5.7.14 PsILaOg> Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 rg6sm12949862pbc.43 - gsmtp Logging into Gmail and checking shows me that Gmail is denying my email Application/device sign-in attempt (prevented 3 times) Today at 10:06 PM Auckland, New Zealand Today at 10:06 PM – Sign-in attempt (prevented) IP Address: 49.224.122.153 (vf.net.nz) Today at 9:46 PM – Sign-in attempt (prevented) IP Address: 49.224.122.153 (vf.net.nz) Today at 9:43 PM – Sign-in attempt (prevented) IP Address: 49.224.122.153 (vf.net.nz) Link to comment Share on other sites More sharing options...
CamEra Posted February 1, 2015 Author Share Posted February 1, 2015 Hi, Further to yesterdays post. I was cheating and didn't make a new instance of email, Once I did that private semail = new(CEMail) it all worked. Thanks for the support George Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.