You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Create message
MimeMessage lMessage = new MimeMessage(session);
lMessage.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
lMessage.setSubject("Hello World!");
lMessage.setText("LineBreak after\n this is a new line\n another new line");
lMessage.addHeaderLine("X_MY_Custom_Header=myValue");
//Send the mail via EWS
lTransport.sendMessage(lMessage, lMessage.getRecipients(Message.RecipientType.TO));
and got the following content
Content-Language: en-US
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
LineBreak after
this is a new line
another new line
while setting plain text in email, it is sent as html and hence all the line breaks are eliminated.
The text was updated successfully, but these errors were encountered: