I am trying to send a mail from my web2py app hosted on GoogleAppEngine. But it is not working. I used the mail function that was given with the web2py. Does anybody how to do this? I read in the GAE Documentation that python mail library would not work with GAE and GAE mail library has to be used. Does it also applies to web2py mail? Thanks
The web2py gluon.tools.Mail class (that is used by the Auth module too) works on GAE and non-GAE out of the box. You just need to pass the correct settings:
mail=Mail()
mail.settings.server="smtp.example.com:25" or "gae"
mail.settings.sender="[email protected]"
mail.settings.tls=True or False
mail.settings.login="you:password"
It supports multiple encodings, MIME and attachments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With