-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactored in order to support strapi 3.15
- Loading branch information
Alessandro Caprarelli
committed
Sep 17, 2020
1 parent
2ac7723
commit 9970451
Showing
3 changed files
with
39 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,34 @@ Using npm: `npm install strapi-provider-email-mailtrap --save` | |
|
||
Using yarn: `yarn add strapi-provider-email-mailtrap` | ||
|
||
## Prerequisites | ||
|
||
- You need a Mailtrap account: https://mailtrap.io | ||
- From the inbox page get your `username` and `password`. | ||
|
||
|
||
## How to use it | ||
|
||
1. You need a Mailtrap account: https://mailtrap.io | ||
2. From the inbox page get your `username` and `password`. | ||
3. From your strapi admin panel go to the `plugins` page. | ||
4. Click on the settings on the email row. | ||
5. Chose `Mailtrap` as provider for your development/staging env. | ||
6. Fill the form with your info. | ||
Instruct the email plugin to use the mailtrap provider. | ||
|
||
```javascript | ||
module.exports = ({ env }) => ({ | ||
// ... | ||
email: { | ||
provider: 'mailtrap', | ||
providerOptions: { | ||
user: env('MAILTRAP_USER', 'default_user'), | ||
password: env('MAILTRAP_PASSWORD', 'default_pass') | ||
}, | ||
settings: { | ||
defaultFrom: env('MAILTRAP_DEFAULT_FROM', '[email protected]'), | ||
defaultReplyTo: env('MAILTRAP_DEFAULT_REPLY_TO', '[email protected]'), | ||
}, | ||
} | ||
// ... | ||
}); | ||
``` | ||
|
||
If you want to use it in every environment, you should add the above code to `config/plugins.js`. | ||
|
||
If you want to use it in a certain environment, you should add the above code to `config/env/plugins.js`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters