Foren
mail notification content
jaid shaik, geändert vor 12 Jahren.
mail notification content
Regular Member Beiträge: 171 Beitrittsdatum: 08.10.10 Neueste Beiträge
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, geändert vor 12 Jahren.
RE: mail notification content
Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
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, geändert vor 12 Jahren.
RE: mail notification content
Regular Member Beiträge: 171 Beitrittsdatum: 08.10.10 Neueste Beiträge
Thanks tejas......its helpful.