Created
November 23, 2019 22:17
-
-
Save jpedroschmitz/bf29441a729a690e527ad1c171c34cfa to your computer and use it in GitHub Desktop.
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
const Env = use('Env'); | |
module.exports = { | |
/* | |
|-------------------------------------------------------------------------- | |
| Connection | |
|-------------------------------------------------------------------------- | |
| | |
| Connection to be used for sending emails. Each connection needs to | |
| define a driver too. | |
| | |
*/ | |
connection: Env.get('MAIL_CONNECTION', 'smtp'), | |
/* | |
|-------------------------------------------------------------------------- | |
| SMTP | |
|-------------------------------------------------------------------------- | |
| | |
| Here we define configuration for sending emails via SMTP. | |
| | |
*/ | |
smtp: { | |
driver: 'smtp', | |
pool: true, | |
port: Env.get('MAIL_PORT'), | |
host: Env.get('MAIL_HOST'), | |
secure: false, | |
auth: { | |
user: Env.get('MAIL_USERNAME'), | |
pass: Env.get('MAIL_PASSWORD'), | |
}, | |
maxConnections: 5, | |
maxMessages: 100, | |
rateLimit: 10, | |
}, | |
/* | |
|-------------------------------------------------------------------------- | |
| SparkPost | |
|-------------------------------------------------------------------------- | |
| | |
| Here we define configuration for spark post. Extra options can be defined | |
| inside the `extra` object. | |
| | |
| https://developer.sparkpost.com/api/transmissions.html#header-options-attributes | |
| | |
| extras: { | |
| campaign_id: 'sparkpost campaign id', | |
| options: { // sparkpost options } | |
| } | |
| | |
*/ | |
sparkpost: { | |
driver: 'sparkpost', | |
apiKey: Env.get('SPARKPOST_API_KEY'), | |
extras: {}, | |
}, | |
/* | |
|-------------------------------------------------------------------------- | |
| Mailgun | |
|-------------------------------------------------------------------------- | |
| | |
| Here we define configuration for mailgun. Extra options can be defined | |
| inside the `extra` object. | |
| | |
| https://mailgun-documentation.readthedocs.io/en/latest/api-sending.html#sending | |
| | |
| extras: { | |
| 'o:tag': '', | |
| 'o:campaign': '',, | |
| . . . | |
| } | |
| | |
*/ | |
mailgun: { | |
driver: 'mailgun', | |
domain: Env.get('MAILGUN_DOMAIN'), | |
apiKey: Env.get('MAILGUN_API_KEY'), | |
extras: {}, | |
}, | |
/* | |
|-------------------------------------------------------------------------- | |
| Ethereal | |
|-------------------------------------------------------------------------- | |
| | |
| Ethereal driver to quickly test emails in your browser. A disposable | |
| account is created automatically for you. | |
| | |
| https://ethereal.email | |
| | |
*/ | |
ethereal: { | |
driver: 'ethereal', | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment