-
-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Labels
Description
Great lib! But how can I send a just plain text mail? My mail has no attachments and no HTML part.
If I use
mailer.sendMail(EmailBuilder.startingBlank()
.to(to)
.from(fromName, fromMailAddress)
.withSubject(subject)
.withPlainText(plainText)
.clearHTMLText()
.buildEmail());
the received mail contains this:
Content-Type: multipart/mixed;
boundary="----=_Part_0_1023714065.1521359548014"
(...)
------=_Part_0_1023714065.1521359548014
Content-Type: multipart/related;
boundary="----=_Part_1_1599771323.1521359548027"
------=_Part_1_1599771323.1521359548027
Content-Type: multipart/alternative;
boundary="----=_Part_2_1876631416.1521359548027"
------=_Part_2_1876631416.1521359548027
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Dies ist ein Test.
=C3=84=C3=96=C3=9C=C3=9F
2018-03-18T08:52:27.960
------=_Part_2_1876631416.1521359548027--
------=_Part_1_1599771323.1521359548027--
------=_Part_0_1023714065.1521359548014--
As far as I understand SMTP it should be possible to send just plain text without the use of MIME parts (if there are no attachments and no HTML part). Background: My Thunderbird mail app thinks at the first second the mail contains an attachment. It shows the paperclip icon for a second. When I open the mail it shows it very well.
I use this jitpack version: compile 'com.github.bbottema:simple-java-mail:5.0.1'