Is there a way to edit the name associated with the From: address of newsletter emails?

I hard coded this. You want to edit line 74 in mailgun.js.

The original file looks like this:

messageData = {
            to: Object.keys(recipientData),
            from: message.from,
            'h:Reply-To': message.replyTo || message.reply_to,
            subject: messageContent.subject,
            html: messageContent.html,
            text: messageContent.plaintext,
            'recipient-variables': recipientData
        };

You want it to look like this

messageData = {
            to: Object.keys(recipientData),
            from: `"CUSTOM-FROM-NAME" <YOUREMAIL@DOMAIN.COM>`,
            'h:Reply-To': message.replyTo || message.reply_to,
            subject: messageContent.subject,
            html: messageContent.html,
            text: messageContent.plaintext,
            'recipient-variables': recipientData
        };
1 Like