mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated sender address for ownership verification emails to new address
no issue - We used existing "from" address as sender for mails sent to new email address for verification, but that breaks the flow to update if the current "from" address has DMARC policy set. - This updates the flow to always send the ownership verification email TO the new address and FROM the new address which both verifies the email deliverability for new address and ownership
This commit is contained in:
parent
8d022ecfb5
commit
806d0f8e21
1 changed files with 14 additions and 0 deletions
|
@ -71,6 +71,20 @@ function createSettingsInstance(config) {
|
|||
});
|
||||
|
||||
const sendEmailAddressUpdateMagicLink = ({email, payload = {}, type = 'fromAddressUpdate'}) => {
|
||||
magicLinkService.transporter = {
|
||||
sendMail(message) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logging.warn(message.text);
|
||||
}
|
||||
let msg = Object.assign({
|
||||
from: email,
|
||||
subject: 'Update email address',
|
||||
forceTextContent: true
|
||||
}, message);
|
||||
|
||||
return ghostMailer.send(msg);
|
||||
}
|
||||
};
|
||||
return magicLinkService.sendMagicLink({email, payload, subject: email, type});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue