Foros de discusión
Steps for sending Email from a custom build Portlet in Liferay
Santhosh konda, modificado hace 11 años.
Steps for sending Email from a custom build Portlet in Liferay
New Member Mensajes: 14 Fecha de incorporación: 16/09/11 Mensajes recientes
Hi,
Can you please let us know what are steps required for sending Email from a custom build Portlet in Liferay.
Can you please share the source code with all configuration path and files.
Can you please let us know what are steps required for sending Email from a custom build Portlet in Liferay.
Can you please share the source code with all configuration path and files.
David H Nebinger, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
Sure. Can you please indicate how you're going to pay for my work?
Seriously, there is nothing magical about sending email in Liferay. You can either just use javamail directly, or you can use the com.liferay.mail.service.MailServiceUtil.sendEmail() method that hides some of the lower-level details.
Seriously, there is nothing magical about sending email in Liferay. You can either just use javamail directly, or you can use the com.liferay.mail.service.MailServiceUtil.sendEmail() method that hides some of the lower-level details.
Sandip Patel, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Regular Member Mensajes: 205 Fecha de incorporación: 5/01/11 Mensajes recientes
Hi,
Along with David H Nebinger's reply you have to set some properties in portal-ext.properties.
mail.session.mail.pop3.host=localhost
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.smtp.auth=false
mail.session.mail.smtp.host=localhost
mail.session.mail.smtp.password=
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=
mail.session.mail.store.protocol=pop3
mail.session.mail.transport.protocol=smtp
Along with David H Nebinger's reply you have to set some properties in portal-ext.properties.
mail.session.mail.pop3.host=localhost
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.smtp.auth=false
mail.session.mail.smtp.host=localhost
mail.session.mail.smtp.password=
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=
mail.session.mail.store.protocol=pop3
mail.session.mail.transport.protocol=smtp
Santhosh konda, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
New Member Mensajes: 14 Fecha de incorporación: 16/09/11 Mensajes recientes
Hi Sandeep;
Can you please share all the steps and source.
Can you please share all the steps and source.
Santhosh konda, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
New Member Mensajes: 14 Fecha de incorporación: 16/09/11 Mensajes recientes
Hi Sandeep,
Can you please the all the steps and configuration things and source code.
Can you please the all the steps and configuration things and source code.
venka reddy, modificado hace 10 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi,
follow the below link , which is useful to sent mail in custom portlet.
http://liferaytutorial.blogspot.in/2013/08/sending-mail-in-liferay.html
follow the below link , which is useful to sent mail in custom portlet.
http://liferaytutorial.blogspot.in/2013/08/sending-mail-in-liferay.html
Fernando Almeida, modificado hace 8 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
New Member Mensajes: 8 Fecha de incorporación: 16/10/14 Mensajes recientes
To send email with attachment i use this:
MailMessage mailMessage = new MailMessage();
mailMessage.setHTMLFormat(true);
mailMessage.setSubject(assuntoEmail);
mailMessage.setBody(mensagem.toString());
try {
mailMessage.setFrom(new InternetAddress(emailFrom,"Portal Unimed"));
mailMessage.setTo(new InternetAddress("fernando.almeida@portalunimed.com.br"));
MailEngine.send(mailMessage);
} catch (AddressException | MailEngineException | UnsupportedEncodingException e1) {
e1.printStackTrace();
}
MailMessage mailMessage = new MailMessage();
mailMessage.setHTMLFormat(true);
mailMessage.setSubject(assuntoEmail);
mailMessage.setBody(mensagem.toString());
try {
mailMessage.setFrom(new InternetAddress(emailFrom,"Portal Unimed"));
mailMessage.setTo(new InternetAddress("fernando.almeida@portalunimed.com.br"));
MailEngine.send(mailMessage);
} catch (AddressException | MailEngineException | UnsupportedEncodingException e1) {
e1.printStackTrace();
}
Hitoshi Ozawa, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Following page is a little bit old but provides sufficient information to sending email from a portlet.
http://portaldevelopment.wordpress.com/2008/06/16/sending-email-in-liferay-portal/
http://portaldevelopment.wordpress.com/2008/06/16/sending-email-in-liferay-portal/
Hitesh Methani, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Regular Member Mensajes: 171 Fecha de incorporación: 24/06/10 Mensajes recientes
You can use com.liferay.mail.service.MailServiceUtil.sendEmail(com.liferay.portal.kernel.mail.MailMessage message) to send the mail.
And for configuring smtp, you can use following sample smtp settings for configuring in portal-ext.properties with valid email id and password.
mail.session.mail.store.protocol=imap
mail.session.mail.transport.protocol=smtp
#smtp properties
mail.session.mail.smtp.host=smtp.gmail.com
mail.session.mail.smtp.password=validpassword
mail.session.mail.smtp.user=validid@gmail.com
mail.session.mail.smtp.port=465
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
#mail.session.mail.smtp.socketFactory.fallback=false
#mail.session.mail.smtp.socketFactory.port=465
# Other protocols mail.session.mail.imap.host=localhost
mail.session.mail.pop3.host=localhost
Thanks and Regards,
Hitesh Methani.
And for configuring smtp, you can use following sample smtp settings for configuring in portal-ext.properties with valid email id and password.
mail.session.mail.store.protocol=imap
mail.session.mail.transport.protocol=smtp
#smtp properties
mail.session.mail.smtp.host=smtp.gmail.com
mail.session.mail.smtp.password=validpassword
mail.session.mail.smtp.user=validid@gmail.com
mail.session.mail.smtp.port=465
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
#mail.session.mail.smtp.socketFactory.fallback=false
#mail.session.mail.smtp.socketFactory.port=465
# Other protocols mail.session.mail.imap.host=localhost
mail.session.mail.pop3.host=localhost
Thanks and Regards,
Hitesh Methani.
me liferay, modificado hace 11 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Junior Member Mensajes: 25 Fecha de incorporación: 14/12/11 Mensajes recientes
Can any body suggest how to do it in 6.0.6 version as I have tried from control panel as well as with property file.
portal.properties
mail.session.mail.smtps.auth=true
mail.session.mail.smtps.host=smtp.gmail.com
mail.session.mail.smtps.password=testpass
mail.session.mail.smtps.port=465
mail.session.mail.smtps.user=user@gmail.com
mail.session.mail.transport.protocol=smtps
portal.properties
mail.session.mail.smtps.auth=true
mail.session.mail.smtps.host=smtp.gmail.com
mail.session.mail.smtps.password=testpass
mail.session.mail.smtps.port=465
mail.session.mail.smtps.user=user@gmail.com
mail.session.mail.transport.protocol=smtps
karthik reddy, modificado hace 10 años.
RE: Steps for sending Email from a custom build Portlet in Liferay
Junior Member Mensajes: 60 Fecha de incorporación: 8/04/13 Mensajes recientes
http://javaeasyforu.blogspot.in/2013/11/sending-mail-in-liferay.html