2018-06-18 17:54:20 +02:00
# Email
2018-10-01 12:19:34 +02:00
::: warning
This feature requires the Email plugin (installed by default).
:::
2018-06-18 17:54:20 +02:00
Thanks to the plugin `Email` , you can send email on your server or externals providers such as Sendgrid.
## Usage
```js
await strapi.plugins['email'].services.email.send({
to: 'admin@strapi .io',
from: 'robbot@strapi .io',
replyTo: 'no-reply@strapi .io',
subject: 'Use strapi email provider successfully',
text: 'Hello world!',
html: 'Hello world!'
});
```
## Install providers
2018-12-14 11:31:41 +01:00
By default Strapi provides a local email system. You might want to send email with a third party.
2018-12-14 12:24:22 +01:00
You can check all the available providers developed by the community on npmjs.org - [Providers list ](https://www.npmjs.com/search?q=strapi-provider-email- )
2018-06-18 17:54:20 +02:00
To install a new provider run:
```
2018-10-19 09:26:09 +02:00
$ npm install strapi-provider-email-sendgrid@alpha --save
2018-06-18 17:54:20 +02:00
```
2018-12-14 11:31:41 +01:00
::: note
If the provider is not in the mono repo, you probably not need `@alpha` depending if the creator published it with this tag or not.
:::
2018-06-18 17:54:20 +02:00
2018-12-14 11:31:41 +01:00
Then, visit `/admin/plugins/email/configurations/development` on your web browser and configure the provider.
2018-06-18 17:54:20 +02:00
2018-12-14 11:31:41 +01:00
## Create providers
If you want to create your own, make sure the name starts with `strapi-provider-email-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `send` functions.