> For the complete documentation index, see [llms.txt](https://foodmonkey-docs.natadtech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://foodmonkey-docs.natadtech.com/define-basics/mail-server.md).

# Mail Server

## Do I need it?

Yes, FoodMonkey requires SMTP (a method for sending mail) as the system relies on it for sending emails.

* Send password reset email
* Order related notifications
* Restaurant owner registration
* Driver registration

#### SMTP from shared hosting

This is likely the simplest method to acquire SMTP data. Generate an email within your hosting service and make note of the credentials. You'll require them during the installation process.

<figure><img src="https://3774121173-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHgqItXoDo5myLGaKMahI%2Fuploads%2F0aHeVEie6Hy2Mfmm9gok%2Fmailserver.jpg?alt=media&amp;token=b8a86993-e45b-4112-b32e-2e68139d0740" alt=""><figcaption></figcaption></figure>

Next, select "Connect Device." All the necessary information can be found there.

<figure><img src="https://3774121173-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHgqItXoDo5myLGaKMahI%2Fuploads%2FpDd1CbqSgi7TnEfB8MKf%2Fnatadtechcpanelt1.jpg?alt=media&amp;token=db687bba-af78-4a44-87aa-a62e89251b2a" alt=""><figcaption></figcaption></figure>

Here are a few examples of how it might appear.

{% tabs %}
{% tab title="SSL" %}

```
MAIL_MAILER=sendmail
MAIL_ENCRYPTION=ssl
MAIL_PORT=465
MAIL_HOST=example.host.com
MAIL_USERNAME=mail@example.com
MAIL_PASSWORD=*****
MAIL_FROM_ADDRESS=mail@example.com
MAIL_FROM_NAME="${APP_NAME}"
```

{% endtab %}

{% tab title="Regular" %}

```
MAIL_MAILER=smtp
MAIL_ENCRYPTION=null
MAIL_PORT=26
MAIL_HOST=example.host.com
MAIL_USERNAME=mail@example.com
MAIL_PASSWORD=*****
MAIL_FROM_ADDRESS=mail@example.com
MAIL_FROM_NAME="${APP_NAME}"
```

{% endtab %}

{% tab title="Regular 587" %}

```
MAIL_MAILER=smtp
MAIL_ENCRYPTION=''
MAIL_PORT=26
MAIL_HOST=example.host.com
MAIL_USERNAME=mail@example.com
MAIL_PASSWORD=*****
MAIL_FROM_ADDRESS=mail@example.com
MAIL_FROM_NAME="${APP_NAME}"
```

{% endtab %}
{% endtabs %}

#### 3rd Party SMTP providers like SendGrid

SendGrid stands out as the premier SMTP provider, offering easy setup and dependable service.

Sign up for an account [here](https://sendgrid.com/).

[This article](https://sendgrid.com/docs/API_Reference/SMTP_API/integrating_with_the_smtp_api.html) is crucial for correctly configuring your SendGrid SMTP.

**Required**: You need to Authenticate your domain to send emails from. [Here](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) is how.

## Test your SMTP

{% embed url="<https://www.smtper.net/>" %}

```
MAIL_MAILER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=xxxxxxxxxxxxxxxxx
MAIL_ENCRYPTION=null

MAIL_FROM_ADDRESS='youremail@yourdomain.com'
MAIL_FROM_NAME='Your Project name'
```
