# Email service

{% hint style="info" %}
You can skip this step if you did not need a verification email in your app

How to disabled email verify?\
1 - open config\default.json\
2- Set false at verifyEmail.enabled
{% endhint %}

###

{% hint style="warning" %}
If you are using **mailgun without domain** you need to verify the emails you want to email Please add your email where you'd like to sign in to your app<https://app.mailgun.com/app/account/authorized>
{% endhint %}

### Send emails using mailgun

1. **Create** [**mailgun**](https://app.mailgun.com/sessions/new) **account**
2. **Update config file**

   <pre class="language-javascript" data-title="/config/default.json"><code class="lang-javascript">// Add this lines
     "mailgun": {
       "apiKey": "key-XXX",
       "domain": "XX.com"
     }
     
   "feathers-mongoose-casl": {
       "mailer": {
         "service": "mailgun",
       },
   </code></pre>

### Send emails using sendgrid

1. **Create** [**s**engrid ](https://signup.sendgrid.com/)**account**
2. **Update config file**

   <pre class="language-javascript" data-title="/config/default.json"><code class="lang-javascript">// Update add this lines
     "sendgrid": {
       "apiKey": "key-XXX",
     }
     
   "feathers-mongoose-casl": {
       "mailer": {
         "service": "sendgrid",
          //Optional - un comment to use template
          //"sendgrid-authentication-emails-templates": {
           //"reset-password": "d-e3565301c97748e199cf07987cfac6bd",
           //"Identity-change": "d-e89c652f1b6a41b4b65ffd8f81a89506",
           //"password-change": "d-e89c652f1b6a41b4b65ffd8f81a89506",
           //"verify-email": "d-2b7c56d513cc4401adfd6475cbc9352e",
           //"password-was-reset": "d-e89c652f1b6a41b4b65ffd8f81a89506",
           //"email-verified": "d-67c7921e8bcc4447a7ae593878a6f0ab"
         //}
       }
   </code></pre>

```
git add .
git commit -m "Update mailgun apiKey"
```


---

# 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://feathersjs-mongoose.gitbook.io/feathers-mongoose-casl/docs/start-new-project-1/open-mailgun-accunt.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.
