# How to setup email notifications

Emails to customers/suppliers and users can be sent through KB CloudERP for various purposes.

For example, Sale/Purchase Email Notification, Recurring Invoice Notifications, etc. To send these notifications, the email details are to be set up in Business Settings.

### Steps for Setting Mail Server Details

Follow the steps below to add your email configuration properly

{% hint style="danger" %}
**TEST:**

Kindly test the email configuration after filling up all the details for your sending server.
{% endhint %}

**Step 1**: Go to **Settings > Business Settings > Email Settings.**

**Step 2:** Add the required details

* MAIL\_DRIVER=smtp
* MAIL\_HOST=
* MAIL\_PORT=
* MAIL\_USERNAME=
* MAIL\_PASSWORD=
* MAIL\_ENCRYPTION=

You can get in contact with your hosting provider for any of the values above.

**For example,** with Gmail, it looks like below:

* MAIL\_DRIVER=smtp
* MAIL\_HOST=smtp.gmail.com
* MAIL\_PORT=587
* MAIL\_USERNAME=
* MAIL\_PASSWORD=
* MAIL\_ENCRYPTION=TLS

{% hint style="info" %}
**NOTE:**&#x20;

Some hosting disable port 587 and due to that email may not work, contact your hosting provider & they will enable it.

Use either TLS or SSL, don’t type both. Also, provide the port according to the given encryption used.
{% endhint %}

**Step 3:** After adding all the details, click the test SMS button to check if the configuration is correct.

If it gives some error, you can fix it accordingly.


---

# Agent Instructions: 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:

```
GET https://docs.kbgfuzion.com/erp/knowledge-base/notifications/how-to-setup-email-notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
