0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

🐛 Fixed missing text version in bulk email (#11919)

closes #11917

- Pass text-only version to mailgun as `text` not `plaintext`
- This ensures we send a text-only version of the email, and this in turn should help to improve spam scores
This commit is contained in:
Hannah Wolfe 2020-06-15 15:31:09 +01:00 committed by GitHub
parent 6535f2ef75
commit 27066ce910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,6 +98,10 @@ module.exports = {
const messageData = Object.assign({}, message, batchData);
// Rename plaintext field to text for Mailgun
messageData.text = messageData.plaintext;
delete messageData.plaintext;
return new Promise((resolve) => {
mailgunInstance.messages().send(messageData, (error, body) => {
if (error) {