-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(sails-mail): use code highlight for configuration * feat(sails-mail): add docs for replyTo
- Loading branch information
1 parent
53aebbd
commit ab1928c
Showing
1 changed file
with
16 additions
and
4 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 |
---|---|---|
|
@@ -17,7 +17,7 @@ next: | |
|
||
To configure mail, create a `config/mail.js` configuration file. Let's look at all the possible configurations you can have in `config/mail.js` | ||
|
||
## default | ||
## `default` | ||
|
||
The `default` config in `config/mail.js` tells Mail which mailer to use by default. The string passed to `default` must be the name of a registered mailer in the `mailers` object | ||
|
||
|
@@ -40,7 +40,7 @@ mail: { | |
} | ||
``` | ||
|
||
## mailers | ||
## `mailers` | ||
|
||
The `mailers` configuration object contains | ||
|
||
|
@@ -63,9 +63,9 @@ The `mailers` configuration object contains | |
In Mail, a mailer is a configuration object that is registered in the `mailers` object in `config/mails.js` or in a `mail` object in `local.js` that specifies at the very least a transport that Mail will use in sending your emails. | ||
::: | ||
|
||
## from | ||
## `from` | ||
|
||
This config let you set a global from address for all your emails. It's really useful if your application sends emails from the same from address. | ||
This config lets you set a global from address for all your emails. It's really useful if your application sends emails from the same from address. | ||
|
||
By default Mail will use this address if no address is passed when you send an email with `sails.helpers.mail.send` | ||
|
||
|
@@ -77,3 +77,15 @@ from: { | |
``` | ||
|
||
You can also set this config by specifying these two environment variables: `MAIL_FROM_NAME` and `MAIL_FROM_ADDRESS`. | ||
|
||
## `replyTo` | ||
|
||
This config lets you set a global reply-to address for all your emails. It's useful if you want replies to go to a specific address. | ||
|
||
Mail will use this address by default if no `replyTo` address is provided when sending an email with `sails.helpers.mail.send`. | ||
|
||
```js | ||
replyTo: '[email protected]' | ||
``` | ||
|
||
You can also set this config by specifying the environment variable `MAIL_REPLY_TO`. |