amazon-web-servicessmtpamazon-workmail

How can I get SMTP credentials from Amazon WorkMail?


I'm trying to setup SMTP gateway for my organisation so that my Django web application can send emails to users.

I have been following this documentation.

However, I am having difficulty understanding what to input in the 'Gateway Address' field. I've tried using the URL smtp.mail.us-west-2.awsapps.com as the gateway address, where us-west-2 is my region.

Unfortunately, I get an error message that says:

Failed to connect with gateway address

Is there an alternative method for setting up an SMTP server so that I can send emails to users from my web application?


Solution

  • Amazon WorkMail does not provide direct access to SMTP credentials for its mailboxes. If you want to send emails programmatically or from an application using Amazon WorkMail, you can use the SMTP settings provided by Amazon SES, not Amazon WorkMail directly. Here's how you can obtain SMTP credentials for Amazon SES:

    Log in to your AWS Management Console using the AWS account associated with your Amazon WorkMail.

    Once logged in, go to the Amazon SES dashboard by either searching for "SES" in the AWS services search bar or by selecting it from the "All services" list.

    Before you can use Amazon SES for sending emails, you need to verify the email address or domain you want to send emails from. This is done to prevent misuse of the service. You can do this under the "Identity Management" section in the SES dashboard.

    To get SMTP credentials, go to the "Email Sending" section in the SES dashboard. Here, you can create SMTP credentials by clicking the "Create My SMTP Credentials" button. Follow the on-screen instructions to complete the process.

    After you've created SMTP credentials, you will be provided with an SMTP username and an SMTP password. These are the credentials you will use to authenticate when sending emails through the Amazon SES SMTP server.

    Please note that Amazon WorkMail and Amazon SES are separate services, and while you can use Amazon SES to send emails programmatically, Amazon WorkMail is primarily used for managing email and calendars for your organization.