Skip to content

Commit

Permalink
Update README.md for using .env
Browse files Browse the repository at this point in the history
  • Loading branch information
MattieBelt committed Sep 10, 2020
1 parent 1e461eb commit a7139dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]',
Expand All @@ -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)
Expand Down

0 comments on commit a7139dd

Please sign in to comment.