staticman icon indicating copy to clipboard operation
staticman copied to clipboard

Notification `email.fromAddress` not overridable

Open pingu8007 opened this issue 4 years ago • 0 comments

The email.fromAddress property was documented as

fromAddress: {
  doc: 'Email address to send notifications from. Will be overridden by a `notifications.fromAddress` parameter in the site config, if one is set.',
  format: String,
  default: '[email protected]',
  env: 'EMAIL_FROM'
}

But the mail template was coded as

{
  from: `Staticman <${config.get('email.fromAddress')}>`,
  to,
  subject,
  html: this._buildMessage(fields, options, data)
}

Although this won't prevent Mailgun delivery mails, those mails will always been sent from address defined by instance, which would be some side effects on spam detection.

image (Gmail will mark such mail sender with via)

I'm working on other features (personal use). PR comes later if nobody takes this issue.

pingu8007 avatar Jul 20 '20 09:07 pingu8007