Rockbot
Rockbot

Reputation: 973

How to use web2py auth to send emails via gmail

When setting up an E-Mail service in Web2Py like described in the book, and using the auth mailer

mail = auth.settings.mailer

does it mean that when I create an account using my gmail-address and password they will be used for logging in to the smtp-server, or do I still have to hardcode the password?

mail.settings.login = 'username:password'

Upvotes: 0

Views: 211

Answers (1)

Anthony
Anthony

Reputation: 25536

Yes, you must still set the mail.settings.login setting (though its value doesn't have to be hard coded in the app code -- it could be retrieved via AppConfig or an environment variable, for example).

Upvotes: 1

Related Questions