掲示板
mail notification content
12年前 に jaid shaik によって更新されました。
mail notification content
Regular Member 投稿: 171 参加年月日: 10/10/08 最新の投稿
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
12年前 に Tejas Kanani によって更新されました。
RE: mail notification content
Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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.
12年前 に jaid shaik によって更新されました。
RE: mail notification content
Regular Member 投稿: 171 参加年月日: 10/10/08 最新の投稿
Thanks tejas......its helpful.