简体   繁体   中英

send activation email django-registration (Amazon SES)

How to send activation email with username by using django-registration .I've configured Amazon SES on server.

Here is my settings

AWSAccessKeyId='my_key'
AWSSecretKey='my_key'
EMAIL_BACKEND = 'django_ses.SESBackend`

When User trying to register. They get following error message. Will you please help me ? Thank you

NoAuthHandlerFound at /accounts/register/
No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV3Handler'] Check               your credentials

I'm doing something wrong? please help

Latest UPDATE

'Check your credentials' % (len(names), str(names)))
NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV3Handler'] Check your credentials

OLD UPDATE

I've made some changes in settings.py

AWS_ACCESS_KEY_ID='my_key'
AWS_SECRET_ACCESS_KEY='my_key'

Now I'm getting following error.

    BotoServerError: 400 Bad Request
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
  <Error>
    <Type>Sender</Type>
    <Code>MessageRejected</Code>
    <Message>Email address is not verified.</Message>
  </Error>
  <RequestId>37ceac2e-3861-11e1-acd0-19854590b66c</RequestId>
</ErrorResponse>

You need to verify the email address that you are sending the emails from before amazon will accept the emails.

From the Amazon SES page :

Verify Email Addresses : Before you can send email via Amazon SES, you need to verify that you own the address from which you'll be sending email. To start the verification process, visit the AWS Management Console .

Before you check whether django-registration can send emails, make sure that sending emails works from the shell

./manage.py shell
from django.core.mail import send_mail

verified_address = "from@example.com"
send_mail('Subject here', 'Here is the message.', verified_address,
    ['to@example.com'], fail_silently=False)

Any error messages might give you a clue what to try next. If send_mail works, then django registration is probably using the wrong address.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM