Configure a custom email account

Sending emails using the Send Email action node, as well as the login & pin-code emails, use the built-in Appfarm Mailgun Account by default. The sender domain of this email is an Appfarm-domain, whereas the Display Name will default to your Solution name.

However, some customers prefer these emails to be sent with their own domain as email address. This is supported by setting up either a Mailgun account, Amazon SES account or SendGrid account.

Mailgun

Here's a short step-by-step guide for setting up your custom email account using Mailgun as email provider.

On mailgun.com and your domain

Go to https://mailgun.com, set up an account (if you do this on behalf of someone else, they should set up the Mailgun account)

  1. Click “Sending”

  2. Click “Add new domain”. Here you name the domain you want to use. For instance mg.mydomain.com (Mailgun recommends using “mg.” before the domain, read why on mailgun.com). You have to choose a region, this may have something to do with where the mail is sent from.

  3. Save and see that you can find your new domain under “Domains”. Click on the domain. Here you see an overview of what you need to do in order to get it up and running

  4. Go to your domain and add the DNS records from your domain in Mailgun. You have to add the types TXT and MX to be able to send emails.

  5. Go back to Mailgun, find your domain under “Domains”. This should now have a green checkmark.

  6. Go to the dashboard and click “API keys”. You need the private API key to set up email settings in Appfarm. You also need the email domain (name found in “Domains”).

In Appfarm Create

  1. Add the private API key as a Secret (Permissions > Secrets)

  2. Go to Environment Config. The following has to be done in each environment.

  3. Select Email provider Mailgun.

  4. Email domain: “Name” from Domains on mail gun

  5. Default Sender Address: This is what the sender in your email will look like. For instance default sender address can be: Human Resources human.resources@mydomain.com. Mydomain.com is the Email domain.

  6. Mailgun API key: Choose the Secret you added in step 1.

  7. Mailgun API key (deprecated): Add the private API key (necessary per may 2021, this dependency will be removed)

  8. Mailgun region: This has to correspond with what you choose for your domain when you added it on mailgun.com

Amazon SES

Here's a short step-by-step guide for setting up your custom email account using Amazon SES as email provider.

On aws.amazon.com/ses/ and your domain

Sign up on https://aws.amazon.com/ses/

  1. Navigate to SES (Simple Email Service)

  2. Navigate to Configuration -> Verified Identities

  3. Click "Create identity". You will need the Access Key ID and Secret Access Key

  4. Set up your domain with "DKIM". Follow the instructions. This also requires setting up CNAME entries.

In Appfarm Create

  1. Add the Secret Access Key as a Secret (Permissions > Secrets)

  2. Go to Environment Config. The following has to be done in each environment.

  3. Select Email provider Amazon SES.

  4. Default Sender Address: This is what the sender in your email will look like. For instance, default sender address can be: Human Resources human.resources@mydomain.com. Mydomain.com is the Email domain.

  5. AWS Access Key ID: Enter the Access Key ID (found in AWS)

  6. AWS Secret Access Key: Choose the Secret you added in step 1.

  7. AWS region: This has to correspond with what you chose for your domain when you added it on AWS. Example: us-east-1.

SendGrid

This guide assumes you have created a SendGrid account and configured your sender identity.

In SendGrid

  1. In your SendGrid account, go to Settings > API Keys.

  2. Click Create API Key.

  3. Configure the API key. It must be configured with access to Mail Send.

  4. Once the API key is created, record the value as it will not be shown again.

In Appfarm Create

  1. In your Appfarm Solution, add the SendGrid API key as a Secret (Permissions > Secrets).

  2. Go to Environment Config. (The following has to be done in each environment you wish to use SendGrid).

  3. For Email provider select SendGrid.

  4. For SendGrid API Key select the Secret you added in step 1.

  5. For Default Sender Address enter an email address that matches your sender identity configuration in SendGrid. This value will be used as the sender (from name and address) in emails sent via Appfarm . It can be either an email only (for example, human.resources@example.com) or a combined from name and email address within angled brackets (for example, Human Resources <human.resources@example.com>).

Last updated