background

Email

Tags:emailintegrationspfdkimsmtpintegratiemailmailse-maile-mailsemailintegratie

Before you can send emails, you need to configure the integration using a custom From-address. To configure your own mailaddress in the email integration, we offer up to two different approaches based on your needs. However the DKIM configuration is strongly advices for both approaches to strengthen the security and reliability of your email communications and improve deliverability, making it a valuable addition to your email infrastructure.

Modifying your email integration

To modify your email integration, navigate to Settings > Integrations. Once you reach the integrations overview, select the Email integration to begin editing your current configuration.


Configuration for the Twikey SMTP-server

If you are uncertain about specific configuration settings please contact your IT department or IT specialist to assist you in this process.
To set up your SMTP integration and use our internal SMTP server, configure the SPF & DKIM records and follow these steps:

  Emails sent via the Twikey SMTP server, like any mail server, will enter a queue and be sent in the order received. While delays can occur at any time during the month, they are particularly common around the 1st due to the high volume of billing runs. To avoid our queue, you can choose to activate an external SMTP server. Please note that if we need to conduct an investigation into your email logs, an additional fee may be charged.

SPF

SPF, otherwise known as "Sender Policy Framework", is an email authentication method designed to detect forging sender addresses during the delivery of the email. To get a full benefit from SPF, you will need to set up DMARC but that will not be covered here as it is not required to complete your SMTP integration setup.

How to set up

SPF is pretty straight forward to setup and only requires a slight modification to your DNS records. If you already have an SPF record, you should only need to add the following include statement: include:_spf.twikey.com. If you need to create a new SPF TXT record, you can look at the example below, this presumes my domain is example.com.

NAMETYPEVALUE
example.com.TXT"v=spf1 include:_spf.twikey.com ~all"
  Twikey does not support resolving includes in your SPF record during validation.
More advanced set-up

In scenarios where the include:_spf.twikey.com directive results in an excessive number of DNS lookups, the following alternatives can be employed to optimize SPF configuration:

  1. Utilize the a mechanism with mail.twikey.com:
    This mechanism specifies that if the IP address of mail.twikey.com is used to send email, it should be considered authorized. Using mail.twikey.com as an a mechanism provides flexibility, as the SPF record dynamically adjusts to changes in the IP address associated with mail.twikey.com. This ensures that your SPF policy remains effective without requiring manual updates whenever the underlying IP address changes.
NAMETYPEVALUE
example.com.TXT"v=spf1 a:mail.twikey.com ~all"
  1. Include the specific IPv4 address: ip4:52.29.184.146
    This mechanism authorizes our mail server's static IP address (52.29.184.146) for sending email on behalf of your domain. Please note that this IP address is static but may change occasionally. Using ip4 allows precise control over which IP addresses are authorized to send email for your domain.
NAMETYPEVALUE
example.com.TXT"v=spf1 ip4:52.29.184.146 ~all"

DKIM, otherwise known as "DomainKeys Identified Mail", adds a digital signature to every outgoing message. This allows receiving servers to verify the mail actually came from your organization. This will also help reduce the number of messages that end up in spam, as the receiving server can verify the authenticity of the message.

For using DKIM in the Twikey application you should set up two DKIM selectors:

  • selector app, for the use in the live environment
  • selector test, for the use in the beta environment
How to set up

To set up the DKIM records, you must add the following DNS records to the domain you wish to use in your FROM field. For example, if I would like to use info@example.com as my email address, I would need to add the following DNS records.

NAMETYPEVALUE
app._domainkey.example.com.CNAMEapp._domainkey.twikey.com.
test._domainkey.example.com.CNAMEtest._domainkey.twikey.com.

Activating the mail integration using Twikey SMTP-server

1. Enter the desired FROM address

After configuring the SPF, you can select the address you want to display as the sender of the email.
More information about the format can be found further in this article, see Full SMTP email address.

Fill in the required address in the From field.

If the DKIM is configured in your DNS settings, click the checkbox to activate the DKIM.

3. Test your configuration

Before saving your configuration, you must conduct a test of the integration settings. If everything works as expected, you will receive a confirmation that the tests passed succesfully.

4. Save your configuration

Click on save and your configuration will be saved. The configured e-mail will be used whenever an email needs to be sent.

Configuration for a custom SMTP-server

  If you decide to use a custom SMTP server you will have to set up the connection credentials for the custom SMTP server. A recommended list of external integrations can be found further in this article, see External integrations. The configuration of DKIM is strongly recommended to activate aswell


1. Enter the desired FROM address

Here, you can select the address you want to display as the sender of the email.
More information about the format can be found further in this article, see Full SMTP email address.

Fill in the required address in the From field.

2. Enter the SMTP connection credentials

To complete the setup of your custom SMTP integration, fill in the fields as indicated below.

FieldRequiredDefault ValueDescription
HostYES<empty>The FQDN hostname or IP of the external SMTP server
PortNO25 or 587 (SSL)The port on which the SMTP server listens for requests
SSL EnabledNOfalseEnables transport level encryption when sending a mail to the SMTP server
UserNO<empty>The username used for when the SMTP server requests authentication
PasswordNO<empty>The password used for when the SMTP server request password based authentication

3. Enable DKIM (optional)

If the DKIM is configured in your DNS settings, click the checkbox to activate the DKIM.

4. Test your configuration

Before saving your configuration, you must conduct a test of the integration settings. If everything works as expected, you will receive a confirmation that the tests passed succesfully.

5. Save your configuration

Your configuration has been saved and will be used whenever an email needs to be sent.


Full SMTP email address

When choosing the FROM address for your SMTP integration, you can use the SMTP email address format. This means you can use of a recognizable name when sending out your emails. For example, if you want to send out a mail as info@twikey.com, the recipient would typically see info@twikey.com in their mailbox.

However, if you prefer the recipient to see Twikey [INFO] instead of solely the email address, you can achieve this by adding a common, recognizable name to the email address. To realize this scenario, you need to input the following text: Twikey [INFO] <info@twikey.com>.

The email address info@twikey.com is enclosed within < and > symbols, distinguishing the beginning and end of the address. Any text preceding the email address will be considered the common name, enabling you to specify your preferred name.

External integrations

The following integrations are possible when configuring a custom SMTP server.

  Gmail and Office365 are currently not supported, as the 'from' and 'username' need to be identical. Mail throttling could also be applied by these providers which would cause unnecessary delays when sending out mails.
  • Combell
    • host=smtp-auth.mailprotect.be
    • ssl=true
    • port=587
  • SendGrid
    • host=smtp.sendgrid.net
    • ssl=true
    • port=587

Validation Check

Verify DKIM-record

You can check the validity of your records by visiting mxtoolbox.com and testing both DKIM Selectors (app and test) for the domain you are configuring. If both selectors return a successful response, you are set to use DKIM for your SMTP configuration.

Verify SPF-record

You can check the validity of your SPF record by visiting mxtoolbox.com and testing the SPF record.

Enter the domain you want to test in the Domain Name field. You can even enter the IP of Twikey if you wish to run a validation test for the found SPF record.

Last Update: 2024-06-26