Enable email on your WordPress instance in Lightsail - Amazon Lightsail

Enable email on your WordPress instance in Lightsail

You can enable email on your WordPress instance in Amazon Lightsail. Configure the SMTP service in the Amazon Simple Email Service (Amazon SES). Then activate and configure the WP Mail SMTP plugin on your instance. After email is enabled, your WordPress administrators can request password resets for their user profiles, and will be sent email notifications for blog posts, website updates, and other plugin messages. This guide shows you how to enable email on your WordPress instance in Amazon Lightsail using Amazon SES.

Contents

For more information, see Using the Amazon SES SMTP Interface to Send Email in the Amazon SES documentation.

Step 1: Review the restrictions

New Amazon Web Services (AWS) accounts that are in the Amazon SES sandbox can send email only to verified addresses and domains. If this is the case for your account, then we recommend that you verify your website’s domain, and verify the email addresses of your WordPress administrators. To get their email addresses, sign in to your WordPress website’s dashboard, and choose Users in the left-navigation menu. You’ll see the administrator email addresses listed in the Email column as shown in the following example:


        Administrator email addresses in the WordPress dashboard.
Note

The default user profile is configured with the user@example.com email address. You should change this to a working email address. For more information, see Users Profile Screen in the WordPress documentation.

To send email to any address and domain, you must request to have your account taken out of the Amazon SES sandbox. For more information, see Moving Out of the Amazon SES Sandbox in the Amazon SES documentation.

Step 2: Complete the prerequisites

You must complete the following tasks before you can enable email on your WordPress instance:

Step 3: Create SMTP credentials in Amazon SES

Creating SMTP credentials in your Amazon SES account is required to configure the WP Mail SMTP plugin that you configure later in this guide. For more information, see Obtaining Your Amazon SES SMTP Credentials in the Amazon SES documentation.

To create SMTP credentials in Amazon SES
  1. Sign in to the Amazon SES console.

  2. From the left-navigation menu, choose SMTP settings.

    The SMTP settings page displays your SMTP server name, ports, and TLS setting. Note these values because you need them later in this guide when configuring the WP Mail SMTP plugin on your WordPress instance.

    
            The SMTP settings displayed in the Amazon SES console.
  3. Choose Create SMTP credentials.

  4. In the IAM User Name text box, leave the default user name, then choose Create.

    
            IAM user name for SMTP credentials in the Amazon SES console.
  5. Choose Show User SMTP Security Credentials to view the SMTP username and password, or choose Download Credentials to download a CSV file containing the same information. You need these credentials later when configuring the WP Mail SMTP plugin on your WordPress instance.

    
            SMTP security credentials in the Amazon SES console.
    Note

    The credentials created in the Amazon SES console are automatically added to AWS Identity and Access Management (IAM) for your account.

Step 4: Verify your domain in Amazon SES

Amazon SES requires that you verify your domain to confirm that you own it and to prevent others from using it. When you verify a domain, you are verifying all email addresses from that domain, so you don't need to verify email addresses from that domain individually. For example, if you verify the domain example.com, you can send email from user1@example.com, user2@example.com, or any other user at example.com. For more information, see Verifying Domains in Amazon SES in the Amazon SES documentation.

To verify your domain in Amazon SES
  1. In the Amazon SES console, from the left-navigation menu, choose Verified identities.

  2. Choose Create identity.

  3. Enter the domain that you want to verify, and choose Create identity.

    The domain that you verify should be the same domain that you’re using with your WordPress instance in Lightsail.

    Important

    Legacy TXT records

    Domain verification in Amazon SES is now based on DomainKeys Identified Mail (DKIM), an email authentication standard that receiving mail servers use to validate an email’s authenticity. Configuring DKIM in your domain’s DNS settings confirms to SES that you’re the identity owner, eliminating the need for TXT records. Domain identities that were verified using TXT records do not need to be reverified; however, we still recommend enabling DKIM signatures to enhance the deliverability of your mail with DKIM-compliant email providers.

    
            Verify a new domain in the Amazon SES console.
  4. After you’ve created your domain identity with Easy DKIM, you must complete the verification process with DKIM authentication by copying the following generated CNAME records to publish to your domain’s DNS provider. Detection of these records can take up to 72 hours. For more information, see Verifying a domain identity with DKIM and Easy DKIM

  5. Open a new browser tab and navigate to the Lightsail console.

  6. On the Lightsail home page, choose Domains & DNS, then choose your domain’s DNS zone.

  7. Add the DNS records from the Amazon SES console. For more information about editing a DNS zone in Lightsail, see the Edit a DNS zone in Amazon Lightsail.

    The result should look like the following example.

    
            Lightsail DNS zone records for Amazon SES SMTP.
    Note

    Enter an @ symbol in the Subdomain text box to use the apex of your domain for an MX record. Additionally, the MX record value provided by Amazon SES is 10 inbound-smtp.us-west-2.amazonaws.com. Enter 10 as the Priority and inbound-smtp.us-west-2.amazonaws.com as the Maps to domain.

  8. In the Amazon SES console, close the Verify a New Domain page.

    After a few minutes, your domain listed in the Amazon SES console is labeled as verified and enabled for sending, as shown in the following example:

    
            Verified domains in the Amazon SES console.

    Your SMTP service in Amazon SES is now ready to send emails from your domain.

Step 5: Verify email addresses in Amazon SES

As a new Amazon SES customer, you must verify the email addresses to which you want to send email. You do this by adding the email addresses in the Amazon SES console. For more information, see Verifying Email Addresses in Amazon SES in the Amazon SES documentation.

We recommend that you add the email addresses of your WordPress website’s administrators. This lets them request password resets for their user profiles, and receive email notifications for blog posts, website updates, and other plugin messages.

Note

If you want to send email to any address without verification, then you must request to have your Amazon SES account moved out of the sandbox. For more information, see Moving Out of the Amazon SES Sandbox in the Amazon SES documentation.

To create an email address identity
  1. In the Amazon SES console, from the left-navigation menu, choose Verified identities.

  2. Choose Create identity.

  3. Choose Email address. Then enter the email address that you want to verify.

  4. Choose Create identity.

Repeat the steps 1 through 4 for every email address that you want to verify. A verification email is sent to the email address that you entered. The address is added to the list of verified email identities with a status of "pending verification." It is marked as "verified" when the user opens the email message and completes the verification process.

To verify an email address identity
  1. Check the inbox of the email address used to create your identity and look for an email from no-reply-aws@amazon.com.

  2. Open the email and click the link to complete the verification process for the email address. After it's complete, the Identity status updates to Verified.


        Verified email identities list in the Amazon SES console.

Step 6: Configure the WP Mail SMTP plugin on your WordPress instance

The final step is to configure the WP Mail SMTP plugin on your WordPress instance. Use the SMTP credentials that you created earlier in this guide in the Amazon SES console.

To configure the WP Mail SMTP plugin on your WordPress instance
  1. Sign in to your WordPress website‘s dashboard as an administrator.

  2. From the left-navigation menu, choose Plugins, then choose Installed Plugins.

  3. Scroll down to the WP Mail SMTP plugin, then choose Activate. If there is a new version of the plugin, make sure to update it before continuing to the next step.

    
            The WP Mail SMTP plugin in the WordPress dashboard.
  4. After the WP Mail SMTP plugin is activated, choose Settings. You may need to scroll back down to find the plugin.

    
            The WP Mail SMTP plugin in the WordPress dashboard.
  5. In the From Email Address text box, enter the email address that you want emails to originate from. The email address that you enter must be confirmed in Amazon SES using the steps earlier in this guide.

  6. Choose Force From Email to force using the email address that you enter in the From Email Address text box, and ignore the “from email address” value set by other plugins.

  7. In the From Name text box, enter the name that you want emails to originate from, or leave it as is to use the name of the WordPress blog.

  8. Choose Force From Name to force using the name that you entered in the From Name text box. Choosing this option ignores the “from name” value set by other plugins, and forces WordPress to use the name that you enter in the From Name text box.

  9. In the mailer section of the page, choose Other SMTP.

  10. Choose Set the return-path to match the From Email to have non-delivery receipts sent to the email address that you enter in the From Email Address text box.

    
            Configuration settings for the WP Mail SMTP plugin.
  11. In the SMTP Host text box, enter the SMTP server name that you got earlier in this guide from the SMTP Settings page in the Amazon SES console.

  12. Choose TLS in the Encryption section of the page to specify that the SMTP service in Amazon SES uses TLS encryption.

  13. In the SMTP Port text box, leave the default value of 587.

  14. Switch the Authentication toggle to ON, then enter the SMTP username and password that you got earlier in this guide from the Amazon SES console.

    
            SMTP settings for the WP Mail SMTP plugin.
  15. Choose Save Settings. A prompt appears confirming that the settings were successfully saved.

  16. Choose the Email Test tab.

    In the next step, you send a test email to confirm that the email service is working.

  17. Enter an email address in the Send To text box, then choose Send Email. The email address that you enter must be confirmed in Amazon SES using the steps earlier in this guide.

    There are two possible results that you should see.

    • If you see a success confirmation, then your WordPress website is enabled for email. Confirm that the following test email arrives at the specified mailbox:

      
                Test email success confirmation.

      You can now choose Lost your password? on the sign-in page for your WordPress website’s dashboard. A new password is emailed to you if the email address on your WordPress user profile is confirmed in Amazon SES.

    • If you see a failure notice, confirm that the SMTP settings that you entered into the WP Mail SMTP plugin match those of the SMTP service in your Amazon SES account. Also confirm that you are using an email address that you verified in Amazon SES.