-
Notifications
You must be signed in to change notification settings - Fork 447
Open
Description
Hi, fromText details are often insufficient, so I brought back the original From-Email-Address, while replacing the @ sign so that it doesn't interfere with the verified sender:
// SES does not allow sending messages from an unverified address,
// so replace the message's "From:" header with the original
// recipient (which is a verified domain)
header = header.replace(
/^from:[\t ]?(.*(?:\r?\n\s+.*)*)/mgi,
function(match, from) {
var fromText;
if (data.config.fromEmail) {
// fromText = 'From: ' + from.replace(/<(.*)>/, '').trim() +
// fromText = 'From: ' + from.replace(/<|>|/g, '').replace('@', '.').trim() +
fromText = 'From: ' + from.replace(/<|>|/g, '').replace(/@/g, '.').trim() +
' <' + data.config.fromEmail + '>';
} else {
fromText = 'From: ' + from.replace('<', 'at ').replace('>', '') +
' <' + data.originalRecipient + '>';
}
return fromText;
});
Metadata
Metadata
Assignees
Labels
No labels