Skip to content

Unable to subscribe to a blog when its name contains commas (or other "special" characters) #1551

@Barbapulpe

Description

@Barbapulpe

Describe the bug

With a blog names "A, B, C et D", I opened email subscription. The field appears to visitors, but when they try to subscribe to the blog, they get a server error in the Web UI, and the error logs state:

Jan 01 20:41:56 writefreely[2662297]: ERROR: 2026/01/01 20:41:56 mailer.go:166: Unable to send email to <[email protected]>: Mail Error: mail: missing '@' or angle-addr; Header: [From] Address: [A, B, C et D <[email protected]>]
Jan 01 20:41:56 writefreely[2662297]: ERROR: 2026/01/01 20:41:56 email.go:155: Failed to send subscription confirmation email: Mail Error: mail: missing '@' or angle-addr; Header: [From] Address: [A, B, C et D <[email protected]>]

I believe this is because the RFC does not allow commas in the e-mail sender name, and WriteFreely gets confused, expecting several recipients when constructing the email.

To solve this, I believe it should be good if WriteFreely puts double-quotes around the blog name (or sanitizes the name).

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Name a blog "A, B, C et D"
  2. In the "Customize blog", tick to allow e-mail subscriptions
  3. Visit the blog and subscribe
  4. You get a "server error" page in the WebUI and the arror message above is logged
  5. As a result, no e-mail is sent, so link cannot be confirmed and subscription is not validated.

Expected behavior

Subscription should be successful and no error in logs.

Application configuration

  • Multi-user mode
  • Database [mysql]
  • Open registration [yes]
  • Federation enabled [yes]
  • SMTP e-mail configured

Version or last commit:
v0.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions