Foros de discusión
mail notification content
jaid shaik, modificado hace 12 años.
mail notification content
Regular Member Mensajes: 171 Fecha de incorporación: 8/10/10 Mensajes recientes
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 hace 12 años.
RE: mail notification content
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
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 hace 12 años.
RE: mail notification content
Regular Member Mensajes: 171 Fecha de incorporación: 8/10/10 Mensajes recientes
Thanks tejas......its helpful.