HomeMusing Studio

Fix unquoted From address and phantom recipient in mailer

Description

Fix unquoted From address and phantom recipient in mailer

Blog names containing commas or other RFC 5322 special characters broke the SMTP
"From" header, silently discarding the recipient too and preventing any email
from sending. This adds mailer.FormatAddress to properly quote/escape display
names.

Also fix mailer.NewMessage pre-allocating a phantom empty-address recipient
alongside every single-recipient send, which caused a spurious "No recipient
specified" error to be logged on every password reset, login link, and
subscription confirmation email. (#1545, #1552)

Fixes #1551

Details

Provenance
mattAuthored on Fri, Aug 7, 4:41 PM
Parents
rWFc47a08957772: Merge pull request #1679 from mpldr-pulls/develop
Branches
Unknown
Tags
Unknown
References
refs/pull/1721/head, fix-smtp-sending