> For the complete documentation index, see [llms.txt](https://mobidonia.gitbook.io/poscloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobidonia.gitbook.io/poscloud/define-basics/obtain-smtp.md).

# Mail server

## Why I need it

You will need to have SMTP ( way to send mail ) because the system will use it to

* Send password reset email
* Order related notifications&#x20;
* Restaurant owner registration
* Driver registration

#### SMTP from shared hosting

This is probably the easiest way to obtain SMTP data. Create an email in your hosting and get a note of the credentials. You will need them in the install process.

![](https://i.imgur.com/t9Awl7B.png)

Then click on "Connect Device". You will find all the required info there

![](https://i.imgur.com/QPpwKY2.png)

Here are some examples of how it may look

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

```
MAIL_MAILER=sendmail
MAIL_ENCRYPTION=ssl
MAIL_PORT=465
MAIL_HOST=mail.restoqr.online
MAIL_USERNAME=themail@domain.com
MAIL_PASSWORD=*****
MAIL_FROM_ADDRESS=themail@domain.com
MAIL_FROM_NAME="${APP_NAME}"
```

{% endtab %}

{% tab title="Regular" %}

```
MAIL_MAILER=smtp
MAIL_ENCRYPTION=null
MAIL_PORT=26
MAIL_HOST=mail.restoqr.online
MAIL_USERNAME=themail@domain.com
MAIL_PASSWORD=*****
MAIL_FROM_ADDRESS=themail@domain.com
MAIL_FROM_NAME="${APP_NAME}"
```

{% endtab %}

{% tab title="Regular 587" %}

```
MAIL_MAILER=smtp
MAIL_ENCRYPTION=''
MAIL_PORT=26
MAIL_HOST=mail.restoqr.online
MAIL_USERNAME=themail@domain.com
MAIL_PASSWORD=*****
MAIL_FROM_ADDRESS=themail@domain.com
MAIL_FROM_NAME="${APP_NAME}"
```

{% endtab %}
{% endtabs %}

#### 3rd Party SMTP providers like SendGrid

SendGrid is the leading SMTP provider. Easy to set up and reliable service.

Get an account [here](https://sendgrid.com/).

[This article](https://sendgrid.com/docs/API_Reference/SMTP_API/integrating_with_the_smtp_api.html) is important in order to setup your SendGrid SMTP correct.

**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'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mobidonia.gitbook.io/poscloud/define-basics/obtain-smtp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
