Fórumok
mail notification content
jaid shaik, módosítva 12 év-val korábban
mail notification content
Regular Member Bejegyzések: 171 Csatlakozás dátuma: 2010.10.08. Legújabb bejegyzések
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, módosítva 12 év-val korábban
RE: mail notification content
Liferay Master Bejegyzések: 654 Csatlakozás dátuma: 2009.01.06. Legújabb bejegyzések
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, módosítva 12 év-val korábban
RE: mail notification content
Regular Member Bejegyzések: 171 Csatlakozás dátuma: 2010.10.08. Legújabb bejegyzések
Thanks tejas......its helpful.