SES with emailadress not working

Hi
I tried setting up SES with an emailadress like blabla@protonmail.com
However after changing everything like described here: Installing on Amazon Web Services — OppiaMobile 0.14.0 documentation
this doesnt seem to work. For the IAM ACCESS USER I took the ID from the AWS ACCESS KEY, I guess this is right? Anyone got an idea what might be wrong?

Cheers,
Sirofjelly

Hi @sirofjelly

Yes it should be the IAM Access users and access key that you’ve set up.

The problem might be to do with the AWS SES sandboxing… when you first use the SES service, it won’t automatically send/receive from/to any email addresses, they need to be verified email addresses (or domains) first.

Then, to be able to send emails out to any email address (not only verified addresses/domains), you need to put in request to AWS to move out of the sandbox.

There’s more info here on the sandboxing: Moving out of the Amazon SES sandbox - Amazon Simple Email Service also, when you put in request to AWS, you can just request for “transactional” (password resets etc), and the default limit (I think) is 1000 emails per hour, which is likley to be more than suffificent,
Cheers,
Alex

Hey @alex

Thank you we are out of the sandbox now :slight_smile: However unfortunately getting password resets does still not work. I have the following points that could be wrong.

  1. Do we need to use an IAM access key? or

  2. do we need to use the smtp access key from the ses console?

  3. I think the template in the rapidsetup docu is outdated? Can this be? I got another template in my settings_secret.py - would be very nice if you could share the right var names etc. with me :slight_smile: (probably copy and blur from a running instance)

You help will be highly appreaciated we are in love with OppiaMobile so far, really cool tool you have built :slight_smile:

Cheers
Sirofjelly

Hi @sirofjelly ,

Ah… it’s the smtp access that you’ll need to use (rather then the IAM access key)… I get a bit mixed up sometimes with all the AWS terminology!

Here’s what we have on the core Oppia server in the settings_secret.py for the email config…

SERVER_EMAIL = 'admin@digital-campus.org'
EMAIL_SUBJECT_PREFIX = '[OppiaMobile]: '

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST = 'email-smtp.eu-west-1.amazonaws.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'xxxxx'
EMAIL_HOST_PASSWORD = 'xxxxx'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'admin@digital-campus.org'

The EMAIL_HOST_USER is the “Smtp Username” and EMAIL_HOST_PASSWORD is the “Smtp Password” from the file you download from AWS when setting up the SES SMTP credentials. For info, the user I have has 20 chars and the password has 44 (though I guess these might not always be the same length).

Likely, yes, we need to update the docs to make this clearer!

Let me know how you get on,
Cheers,
Alex

Hey @alex

Thank you for clarifying the use of smtp access :slight_smile:
It now works like a charm!

I think making this clearer in the docs would help a lot of people going through it. If I find time, I will do a PR for the whole rapidsetup :slight_smile:

Cheers
Sirofjelly

1 Like