This repository was archived by the owner on Mar 29, 2025. It is now read-only.
Description The problem to solve
Not enough information/code examples in the docs for working barebones emails
Proposed solution
Adding code examples of possible configurations, along with links to supporting docs and npm modules
Example 1: using email service like Postmark with nodemailer's built in STMP transport options
'apostrophe-email': {
nodemailer: {
service: 'Postmark',
auth: {
user: 'username-from-postmark-account',
pass: 'password-from-postmark-account'
}
}
};
Example 2: using email service like mailgun with supporting transport module
in apostrophe-email:
const mailgunTransport = require('nodemailer-mailgun-transport');
const nodemailer = require('nodemailer');
const _ = require('lodash');
module.exports = {
construct: function (self, options) {
self.getTransport = function (req, data, options) {
const apiKey = 'your-mailgun-api-key';
const domain = 'your-mailgun-domain';
const auth = {
auth: {
api_key: apiKey,
domain: domain
}
};
const transport = mailgunTransport(_.assign(self.options.nodemailer, auth));
self.transport = nodemailer.createTransport(transport);
return self.transport;
};
}
};
Exmaple 3: set it up with credentials to send SMTP email via a gmail account (as suggested in docs)
Alternatives
N/A
Additional context
N/A
Reactions are currently unavailable
The problem to solve
Not enough information/code examples in the docs for working barebones emails
Proposed solution
Adding code examples of possible configurations, along with links to supporting docs and npm modules
Example 1: using email service like Postmark with nodemailer's built in STMP transport options
Example 2: using email service like mailgun with supporting transport module
in
apostrophe-email:Exmaple 3: set it up with credentials to send SMTP email via a gmail account (as suggested in docs)
Alternatives
N/A
Additional context
N/A