when i am sending using this code :
MimeMessage msg;
try {
IChannel emailChannel = ChannelFactory.getInstance().getChannel(ChannelFactory.EMAIL);
msg = createMessage(text);
emailChannel.sendTo(phTo,"a@xxx.com",msg);
// emailChannel.sendTo(phTo,phFrom,msg);
emailChannel.sendTo("o@xxx.com","p@xxx.com",msg);
emailChannel.sendTo("N@xxx.com","p@xxx.com",msg);
error_messg = "\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4";
String htmlBody = "";
htmlBody = htmlBody + "<div dir=rtl align=right>";
htmlBody = htmlBody +txt;
htmlBody = htmlBody + "</div>";
String username = request.getUser().getFirstName() + " " + request.getUser().getLastName();
if (username.trim().equalsIgnoreCase("")){
username = request.getUser().getName();
}
htmlBody = htmlBody + "<br/>Sent by "+username+", Coca-Cola<br/>";
lastMessageInHtml = htmlBody;
htmlBody = "<html><head></head><body>" + htmlBody + "</body></html>";
// response.write(htmlBody);
msg.setContent(htmlBody,"text/html; charset=windows-1255");
}
in the mail headers i see the message as :
urn:schemas:httpmail:htmldescription ==>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
test1
</body>
</html>
but in the other header :
urn:schemas:httpmail:textdescription==>> i don't get here nothing!!!!!
in the HTML header i recive content, and in the text header i dont!
but if i send an email from outlook, i recive data in this both header
any idea why is the diffrence?
and how can i change the code so the text header will be recived too!
thnaks i nadvance
peleg