Package com.liferay.portal.kernel.mail

Examples of com.liferay.portal.kernel.mail.MailMessage


    InternetAddress from = new InternetAddress(fromAddress, fromName);

    InternetAddress to = new InternetAddress(toAddress, toName);

    MailMessage mailMessage = new MailMessage(
      from, to, subject, body, true);

    MailServiceUtil.sendEmail(mailMessage);
  }
View Full Code Here


   
    WarrantUserEmailLogLocalServiceUtil.updateWarrantUserEmailLog(createWarrantUserEmailLog);
  }

  private static void sendEmail(Warrant warrant, String to, String subject, String body) throws AddressException {
    MailMessage mailMessage = new MailMessage();
    mailMessage.setFrom(new InternetAddress(ADDR_FROM));
    mailMessage.setTo(new InternetAddress(to));
    mailMessage.setSubject(subject);
    mailMessage.setBody(body);
    MessageBusUtil.sendMessage(DestinationNames.MAIL, mailMessage);
  }
View Full Code Here

     
      currentUser = UserLocalServiceUtil.getUser(userId);

      sellingUser = UserLocalServiceUtil.getUser(warrant.getUserId());

      MailMessage mailMessageS = new MailMessage();
      mailMessageS.setBody(mailMessage);
      mailMessageS.setFrom(new InternetAddress(currentUser.getEmailAddress()));
      String subject = "Warrant interest";
      mailMessageS.setSubject(subject);
      mailMessageS.setTo(new InternetAddress(sellingUser.getEmailAddress()));
      MessageBusUtil.sendMessage(DestinationNames.MAIL, mailMessageS);
     
     
      logEmailMessageSent(subject, mailMessage);
View Full Code Here

TOP

Related Classes of com.liferay.portal.kernel.mail.MailMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.