Skip to content
Back to catalog
SMTP

Email with SMTP

Send customized emails to your users through any SMTP server

The Simple Mail Transfer Protocol (SMTP) is the standard protocol for sending email between servers. Almost every email service accepts mail over SMTP, from transactional email providers to workplace email, and you can also run your own mail server.

How does the integration work?

You can use the SMTP provider in Appwrite Messaging to send customized emails to your users through an email service that Appwrite doesn't have a dedicated provider for, or through a mail server you host yourself. Emails can be sent immediately or scheduled, to topics, users, or individual targets.

Appwrite connects to the host and port you set, signs in with your username and password, and encrypts the connection with SSL or TLS.

How to implement

To implement the SMTP provider in Appwrite Messaging, there are several steps you must complete:

Step 1: Get your SMTP settings

First, collect the SMTP settings from your email service or mail server: the host, the port, a username and password, and the encryption the server expects. Most services use port 587 with TLS or port 465 with SSL. Make sure the server allows sending from the address you plan to use as the sender.

Step 2: Add the SMTP provider to your Appwrite project

For this step, you must create an account on Appwrite Cloud or self-host Appwrite if you haven't already. In your Appwrite project, head to Messaging > Providers, click Add provider, and choose Email. Give your provider a name, choose SMTP, and click Save and continue.

In the Configure step, fill in the following fields:

Field name
HostThe server address of your SMTP provider, such as smtp.example.com.
PortThe port used for SMTP connections. Defaults to 587.
UsernameYour SMTP account username.
PasswordYour SMTP account password.
EncryptionThe encryption used for the connection, SSL or TLS.
Auto TLSAutomatically uses TLS encryption when the server supports it.
MailerOptional. The value Appwrite sets in the X-Mailer header of the emails.
Sender emailThe address emails are sent from. Your SMTP server must allow sending from it.
Sender nameThe sender name that appears in the emails sent from this provider.
Reply-to emailThe reply-to email that appears in the emails sent from this provider.
Reply-to nameThe reply-to name that appears in the emails sent from this provider.

Click Save and continue to enable the provider.

Step 3: Test the SMTP provider

Before you proceed, you must already have at least one topic or target set up.

Go to Messaging > Messages, click Create message, and choose Email. Write a test message, select one of your test targets, set the schedule to Now, and click Send. Check that the email arrives in your inbox. If it doesn't, check the logs in the Appwrite Console and on your SMTP server.

To send emails from your backend instead, follow the Send email messages guide with an Appwrite Server SDK.

Read more about SMTP and Appwrite Messaging

If you would like to learn more about SMTP and Appwrite Messaging, we have some resources that you should visit:

Technology Partner Program

Building on Appwrite?

Teams and developers who ship integrations, tools, or services on Appwrite can join our partner program for verified catalog placement, co-marketing, training, and engineering support.