forked from kaldigo/strapi-email-nodemailer-gmail
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e461eb
commit a7139dd
Showing
1 changed file
with
7 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -45,7 +45,7 @@ module.exports = ({ env }) => ({ | |
providerOptions: { | ||
username: '[email protected]', | ||
clientId: env('EMAIL_CLIENT_ID'), | ||
privateKey: env('EMAIL_PRIVATE_KEY'), | ||
privateKey: env('EMAIL_PRIVATE_KEY').replace(/\\n/g, '\n'), | ||
}, | ||
settings: { | ||
defaultFrom: '[email protected]', | ||
|
@@ -56,6 +56,12 @@ module.exports = ({ env }) => ({ | |
}); | ||
``` | ||
|
||
**TIP:** When using environment variables for your privateKey, as in the example above, include all the `\n` in you .env file, like so: | ||
```..env | ||
EMAIL_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nAbC...xYz\n-----END PRIVATE KEY-----\n" | ||
``` | ||
|
||
|
||
### G Suite | ||
When using G Suite follow these steps authorize the right scopes: | ||
1) Go to G Suite admin dashboard > Security > Advanced settings > [Manage domain-wide delegation](https://admin.google.com/ac/owl/domainwidedelegation) | ||
|