multipart-email-support
What: carlos email test now sends multipart/alternative, a text/plain part followed by a text/html part, instead of plain text only.
Why: James wanted to be sure apps can send multipart (plain + HTML) mail through the platform. They already can. The delivered credential is SES SMTP submission authorised by ses:SendRawEmail (internal/mail/policy.go), and the only policy condition is ses:FromAddress. Nothing on the platform reads or rewrites a body. But the one message the platform builds itself was plain text, so email test could not show it.
Changes:
mail_cli.go:buildTestMessagebuilds the body withmime/multipartand addsMIME-Versionand the multipartContent-Type.mail_cli_test.go:TestBuildTestMessageIsMultipartAlternativeparses the message withnet/mail+mime/multipart, checks both parts in plain-then-HTML order, and checks no line exceeds 998 bytes.docs/site/cli.md: says the test message is multipart, and that apps may send any MIME message over their credential.
Tested: gofmt/vet clean, go build ./..., full root package and internal/docsite tests pass locally. No live carlos email test was run.
Makes carlos email test send multipart/alternative (plain + HTML) so it proves HTML mail gets through.
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- No activity yet.