Hi,
" +
Hi,
Hi Atul,
Thank you for contacting Aspose Support team.
Please use the following sample code to get started with the API. We have updated the documentation sample to the latest API code for reference. Please try the code at your end and let us know your feedback if you face some problem.
Sample Code:
String strBaseFolder = “C:\Lap_C_Drive\APOSEMAILS”;
System.out.println(“Creating new messages…”);
MailMessage message = new MailMessage();
message.setFrom(new MailAddress("atul.bhadauria@xchanging.com", “Atul Singh”, false));
message.getTo().addItem(new MailAddress("atul.bhadauria@xchanging.com", “Atul Singh”));
message.getTo().addItem(new MailAddress("atuls.work@gmail.com", “ATUL2”, false));
message.setSubject(“New message created by Aspose.Email for Java”);
message.setHtmlBody("This line is in bold.
" +
“This line is in blue color”);
message.save(strBaseFolder + “Message.eml”, SaveOptions.getDefaultEml());
message.save(strBaseFolder + “Message.msg”, SaveOptions.getDefaultMsg());
message.save(strBaseFolder + “Message.mhtml”, SaveOptions.getDefaultMhtml());
System.out.println(“Messages created successfuly”);
Thank you so much.
Hi Atul,
Thank you for your feedback. We update the documentation from time to time with every release. One such activity is currently under process to update obsolete code samples. Please feel free to contact us in case you have any further query related to the API.