Skip to content

SMTP email fails with Amazon SES — malformed MIME boundary (v0.8.9) #372

Open

Description

@thegingerninja

Environment

  • Windshift v0.8.9
  • Standalone Linux binary on AWS EC2, managed by systemd
  • Amazon SES SMTP (eu-west-2), port 587, STARTTLS

Problem

Both the built-in SMTP test and user invitation emails fail with:

554 Transaction failed: In parameter list <; boundary=----=_NextPart_...>, expected ';', got "="

Diagnostics

  • Amazon SES production sending is enabled.
  • A standalone Python smtplib test using the same SMTP server, credentials and sender address succeeds and delivers email.
  • Windshift logs confirm the invitation email fails with the same error.
  • The suspected issue is an unquoted MIME boundary parameter in the outgoing Content-Type header.

Expected behaviour

Windshift sends valid multipart MIME messages accepted by Amazon SES.

Activity

  1. thegingerninja commented on Oct 23, 2026

    @thegingerninja
    Author
    diff --git a/internal/smtp/notification_sender.go b/internal/smtp/notification_sender.go
    --- a/internal/smtp/notification_sender.go
    +++ b/internal/smtp/notification_sender.go
    @@ -1,2 +1,7 @@
    -	headers := fmt.Sprintf("From: %s\r\nTo: %s\r\nSubject: %s\r\nMIME-Version: 1.0\r\nContent-Type: multipart/alternative; boundary=%s\r\n",
    -		from, to, encodeHeaderWord(opts.Subject), boundary)
    +	contentType := mime.FormatMediaType(
    +		"multipart/alternative",
    +		map[string]string{"boundary": boundary},
    +	)
    +
    +	headers := fmt.Sprintf("From: %s\r\nTo: %s\r\nSubject: %s\r\nMIME-Version: 1.0\r\nContent-Type: %s\r\n",
    +		from, to, encodeHeaderWord(opts.Subject), contentType)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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