Fórum
mail notification content
jaid shaik, modificado 12 Anos atrás.
mail notification content
Regular Member Postagens: 171 Data de Entrada: 08/10/10 Postagens Recentes
Hi all,
mail notification with html content formate...Can any one help in this regard.
Thanks
Jaid
mail notification with html content formate...Can any one help in this regard.
Thanks
Jaid
Tejas Kanani, modificado 12 Anos atrás.
RE: mail notification content
Liferay Master Postagens: 654 Data de Entrada: 06/01/09 Postagens Recentes
Hi Jaid,
I hope you are looking for how to send html mail.
Check out below code it might help you.
just pass htmlFormat as true and it will send mail as html format. And in body pass your html code as a string.
I hope you are looking for how to send html mail.
Check out below code it might help you.
import javax.mail.internet.InternetAddress;
import com.liferay.portal.kernel.mail.MailMessage;
import com.liferay.mail.service.MailServiceUtil;
final InternetAddress from = new InternetAddress(fromAddress, fromName);
final InternetAddress to = new InternetAddress(toAddress, toName);
final MailMessage message = new MailMessage(from, to, subject, body, htmlFormat);
MailServiceUtil.sendEmail(message);
just pass htmlFormat as true and it will send mail as html format. And in body pass your html code as a string.
jaid shaik, modificado 12 Anos atrás.
RE: mail notification content
Regular Member Postagens: 171 Data de Entrada: 08/10/10 Postagens Recentes
Thanks tejas......its helpful.