We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When send smtp email with both html and plain text, the Content-Type is not properly set.
To Reproduce
cfg := mail.Config{ URL: "smtp.gmail.com", FromAddress: "[email protected]", FromName: "Gopher", Password: "my-password", Port: 587, } mailer, err := drivers.NewSMTP(cfg) if err != nil { log.Fatalln(err) } tx := &mail.Transmission{ Recipients: []string{"[email protected]"}, Subject: "Multipart Email Example", HTML: "<h1>This is the HTML Section!</h1>", PlainText: "Plain text email goes here!", } result, err := mailer.Send(tx)
Expected behavior
From: [email protected] To: [email protected] Subject: Multipart Email Example Content-Type: multipart/alternative; boundary="boundary-string" --your-boundary Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Plain text email goes here! --boundary-string Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <h1>This is the HTML Section!</h1> --boundary-string--
There is a article for Multipart MIME Email Guide. And go-simple-email seems work well with it.
The text was updated successfully, but these errors were encountered:
@kaptinlin can you confirm below?
MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8; boundary=be784b8c49238b246169a6a634ade1e42e1054dd03723c9f72bad8267a2e Subject: Subject To: [email protected] --be784b8c49238b246169a6a634ade1e42e1054dd03723c9f72bad8267a2e Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hey! --be784b8c49238b246169a6a634ade1e42e1054dd03723c9f72bad8267a2e Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <h1>Hey!</h1> --be784b8c49238b246169a6a634ade1e42e1054dd03723c9f72bad8267a2e--
And for mutlipart:
MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=6564f3879c8a3d3757dcd42835c1bb64b994636889a5908e42f83dcd5239 Subject: Subject To: [email protected] --6564f3879c8a3d3757dcd42835c1bb64b994636889a5908e42f83dcd5239 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hey! --6564f3879c8a3d3757dcd42835c1bb64b994636889a5908e42f83dcd5239 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <h1>Hey!</h1> --6564f3879c8a3d3757dcd42835c1bb64b994636889a5908e42f83dcd5239
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When send smtp email with both html and plain text, the Content-Type is not properly set.
To Reproduce
Expected behavior
There is a article for Multipart MIME Email Guide. And go-simple-email seems work well with it.
The text was updated successfully, but these errors were encountered: