2

I need to send email from my server to smtp.gmail.com using classic ASP. I am using the ASPEmail component and have the latest version (5.4.0.6) aspemail64.

Everything I try gives an error.

1) Just user and password

mailer.host     = "smtp.gmail.com"
mailer.Username = "someone@somewhere.org"
mailer.Password = "somepass"

This gives: Err = 530 5.7.0 Must issue a STARTTLS command first.

2) TLS and port 587

mailer.TLS = True
mailer.Port = 587

Transport Layer Security Error #30 (SMTP): 534-5.7.14 Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754

3) SSL and port 465

mailer.SSL = True
mailer.Port = 465

Transport Layer Security Error #30 (SMTP): 534-5.7.14 Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754

Anyone get Classic ASPEmail64 working with smtp.gmail.com?

Austin
  • 337
  • 1
  • 2
  • 9
  • Did you follow that link? Did you try the "Allow less secure apps" settings that it suggests? – Grisha Levit Feb 04 '17 at 08:11
  • Possible duplicate of [Gmail SMTP debug: error "please log in via your web browser"](http://stackoverflow.com/questions/20337040/gmail-smtp-debug-error-please-log-in-via-your-web-browser) – Grisha Levit Feb 04 '17 at 08:11

1 Answers1

1

Thanks for the answers.

I got this figured out and this information may help someone else.

You have to have a SPF record in your DNS. https://en.wikipedia.org/wiki/Sender_Policy_Framework

Once I put that in all the weird errors went away even with the gmail security setting turned back on.

It works now with the latest ASPEmail64 and these settings.

mailer.From     = "someone@somewhere.com"
mailer.Username = "someone@somewhere.com"
mailer.Password = "password"

mailer.host = "smtp.gmail.com"
mailer.TLS = True
mailer.Port = 587
Austin
  • 337
  • 1
  • 2
  • 9