I am using following java code to send email ticket which is Html code in a mail body and also sending same ticket as attachment a html file. but some extra lines coming in the body for email clients other than Microsoft outlook like g mail etc,Here is the code,
HtmlEmail service = new HtmlEmail();
//getting body as Html content
String `strBodyText` = getSpotTicketContent(bobTicketVO,strBhLogoCid);
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write(strBodyText);
bw.close();
URL filePath = new URL("file:///"+file.getPath());
service.attach(filePath, ""+orderType+""+dealID+".html""Baydonhill Order Ticket");
service.send();
------ = _ Part_8_20713850.1361775519720--のような1つの余分なラインが来るボディを除いて、すべてのものは素晴らしいアタッチメントとボディが適切に来るようです。
Apache CommonEmails1.2とJava1.4を使用していますenter code here