@bg-dev/strapi-provider-email-gmail
Version:
A Strapi plugin for sending email from Gmail
51 lines (36 loc) • 1.08 kB
Markdown
A Strapi plugin for sending email from Gmail through google oauth2
```bash
npm i @bg-dev/strapi-provider-email-gmail
```
To run this project, you will need to add the following environment variables to your .env file
**For detailed intructions on how to get these secrets, please refer to this [video tutorial](https://www.youtube.com/watch?v=-rcRf7yswfM&ab_channel=yoursTRULY)**
`GMAIL_CLIENT_ID`
`GMAIL_CLIENT_SECRET`
`GMAIL_USER_EMAIL`
`GMAIL_REFRESH_TOKEN`
```javascript
module.exports = ({ env }) => ({
// // ...
email: {
config: {
provider: "@bg-dev/strapi-provider-email-gmail",
providerOptions: {
clientId: env("GMAIL_CLIENT_ID"),
clientSecret: env("GMAIL_CLIENT_SECRET"),
userEmail: env("GMAIL_USER_EMAIL"),
refreshToken: env("GMAIL_REFRESH_TOKEN"),
},
settings: {
defaultFrom: env("GMAIL_USER_EMAIL"),
defaultReplyTo: env("GMAIL_USER_EMAIL"),
},
},
},
// ...
});
```