*/
public void createAndSendMail(CustomerInfo customerInfo, long orderKey) throws MailerAppException
{
try
{
EMailMessage eMessage = new EMailMessage(createSubjectLine(orderKey),
createMessage(orderKey),
customerInfo.getCustomerID());
Util.debug("Sending message" +
"\nTo: " + eMessage.getEmailReceiver() +
"\nSubject: " + eMessage.getSubject() +
"\nContents: " + eMessage.getHtmlContents());
//Session mailSession = (Session) Util.getInitialContext().lookup(MAIL_SESSION);
MimeMessage msg = new MimeMessage(mailSession);
msg.setFrom();
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(eMessage.getEmailReceiver(), false));
msg.setSubject(eMessage.getSubject());
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText(eMessage.getHtmlContents(), "us-ascii");
msg.setHeader("X-Mailer", "JavaMailer");
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp);
msg.setContent(mp);
msg.setSentDate(new Date());