Skip to content

Send the plain-text alternative on every email provider - #427

Closed
RobinMeis wants to merge 1 commit into
Notifuse:mainfrom
RobinMeis:v40.0-multipart
Closed

RobinMeis wants to merge 1 commit into
Notifuse:mainfrom
RobinMeis:v40.0-multipart

Conversation

@RobinMeis

Copy link
Copy Markdown

Fixes issue #426. EmailTemplate.Text was accepted and persisted by the API but never reached a send: CompileTemplateResponse had no Text field, SendEmailProviderRequest had a single HTML-only Content field, and none of the seven provider integrations (SES, SMTP, SendGrid, Postmark, Mailgun, Mailjet, SparkPost) ever built a multipart/alternative message. Every outbound email - broadcast, automation, transactional - went out text/html only regardless of what a template's text field held.

EmailTemplate.Text was accepted and persisted by the API but never
reached a send: CompileTemplateResponse had no Text field,
SendEmailProviderRequest had a single HTML-only Content field, and none
of the seven provider integrations (SES, SMTP, SendGrid, Postmark,
Mailgun, Mailjet, SparkPost) ever built a multipart/alternative message.
Every outbound email - broadcast, automation, transactional - went out
text/html only regardless of what a template's text field held.

SendEmailForTemplate now renders the plain-text alternative through the
same Liquid variables as the subject (a rendering failure falls back to
the raw text instead of failing the send) and passes it through
SendEmailProviderRequest.PlainText. Each provider builds a proper
multipart/alternative body when it is set; templates with no plain text
are unaffected and keep sending HTML-only exactly as before.
@RobinMeis RobinMeis closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant