The web2py gluon.tools.Mail class (which is also used by the Auth module) works with GAE and without 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="you@example.com"
mail.settings.tls=True or False
mail.settings.login="you:password"
It supports multiple encodings, MIME and attachments.