No, but you can pass a custom mailer to the Auth system to get it to send
emails via AWS SES. You custom mailer should take the same arguments as the
web2py mail.send() method (in particular, Auth just needs the "to",
"subject", and "message" arguments) -- so, something like:
def ses_mailer(to, subject, message):
# Use "to", "subject", and "message" in the below call to the boto send()
method.
boto3.client('ses', ...).send(...)
Then either:
auth = Auth(..., mailer=ses_mailer)
or after defining auth:
auth.settings.mailer = ses_mailer
Anthony
On Tuesday, December 12, 2017 at 11:40:06 AM UTC-5, Jordan Ladora wrote:
>
> Hi,
>
> How can I have the w2p default mailer use a commercial service, in my
> case, AWS SES via boto?
>
> I've got these lines in a model and would like to have w2p send
> verification & reset password emails via boto-
>
> *mail = auth.settings.mailer*
> *mail.settings.server = ...*
> *mail.settings.server = ...*
> *mail.settings.sender = ...*
> *mail.settings.login = ...*
> *auth.settings.registration_requires_verification = True*
> *auth.settings.registration_requires_approval = True*
> *auth.messages.verify_email = 'Click on the link http://' +
> request.env.http_host + URL(r=request, c='default', f='user',
> args=['verify_email']) + '/%(key)s to verify your email'*
> *auth.settings.reset_password_requires_verification = True*
> *auth.messages.reset_password = 'Click on the link http://' +
> request.env.http_host + URL(r=request, c='default', f='user',
> args=['reset_password']) + '/%(key)s to reset your password'*
>
>
> Thanks!
> -j
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.