-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor mailer and add connection test #2074
Conversation
Will this allow us to send different templates with the mailer? |
That should be possible already (but I've added a few related fixes to this). It should be possible by adding your templates to app.mailer.send('[email protected]', 'Subject', 'Body', { name: 'path/to/template.hbs' }, callback); You can also add extra bits of dynamic data to the 4th param, and reference this in your template (we should maybe change this, so that these can be added directly to the template options): {
name: 'path/to/template.hbs',
hello: 'world'
} <p class="text">
Hello {{{templateData.hello}}}
</p> |
* @param {String} toAddress Address to send mail to | ||
* @param {String} subject Email subject line | ||
* @param {String} text Email body | ||
* @param {Object} templateData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested with gmail
Fixes #2072.
TODO: needs to be integrated with the new dependency checks once they're in.