Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: SMTP configuration for Sendgrid
Hi,
LR version 7.2 GA1
We are trying to configure SMTP settings to send out emails from Form on portal.
However, the emails are not sent with Authentication Error.
Below are settings in portal-ext.properties
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=smtp.sendgrid.net
mail.session.mail.smtp.password=********
mail.session.mail.smtp.port=587
mail.session.mail.smtp.user=something@azure.com
mail.transport.protocol=smtp
mail.smtp.starttls.enable=true
Error Log
2019-12-09 06:53:18.445 ERROR [liferay/mail-2][MailEngine:74] Unable to send message: null
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at com.liferay.petra.mail.MailEngine._send(MailEngine.java:627)
at com.liferay.petra.mail.MailEngine.send(MailEngine.java:386)
at com.liferay.petra.mail.MailEngine.send(MailEngine.java:461)
at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)
at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
at java.lang.Thread.run(Thread.java:748)
Am I missing something in the property file?
Thanks .
LR version 7.2 GA1
We are trying to configure SMTP settings to send out emails from Form on portal.
However, the emails are not sent with Authentication Error.
Below are settings in portal-ext.properties
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=smtp.sendgrid.net
mail.session.mail.smtp.password=********
mail.session.mail.smtp.port=587
mail.session.mail.smtp.user=something@azure.com
mail.transport.protocol=smtp
mail.smtp.starttls.enable=true
Error Log
2019-12-09 06:53:18.445 ERROR [liferay/mail-2][MailEngine:74] Unable to send message: null
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at com.liferay.petra.mail.MailEngine._send(MailEngine.java:627)
at com.liferay.petra.mail.MailEngine.send(MailEngine.java:386)
at com.liferay.petra.mail.MailEngine.send(MailEngine.java:461)
at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)
at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
at java.lang.Thread.run(Thread.java:748)
Am I missing something in the property file?
Thanks .
Shruti Mishra:
According to the portal.properties documentation, those should be all.
Hi,
LR version 7.2 GA1
We are trying to configure SMTP settings to send out emails from Form on portal.
However, the emails are not sent with Authentication Error.
What you can do is: Alternatively configure a connection on your appserver, and make it available through mail.session.jndi.name - this way you can test the connection on the appserver, plus you're not saving a cleartext password in Liferay's configuration.
Another idea: You've (correctly) masked out your password - make sure it doesn't contain anything nasty for the properties-formatting: E.g. if the password ends in a backslash, that might signal a linebreak in the properties file, instead of the literal character. I'm also never sure if/how/when something like \t is expanded to the tab character. Let alone other non-ASCII characters.
Hi Shruti,
Send Grid mail servers run on SMTPS protocols, if you change the mail.transport.protocol=smtp to mail.transport.protocol=smtps that should do the trick. Let me know if you need more information on this.
Regards,
Ankit Kulshrestha
Send Grid mail servers run on SMTPS protocols, if you change the mail.transport.protocol=smtp to mail.transport.protocol=smtps that should do the trick. Let me know if you need more information on this.
Regards,
Ankit Kulshrestha
mail.transport.protocol=smtps worked!!!
Thank you Ankit
Thank you Ankit
Hi ,
I am trying to configure SMTP settings to send out emails from portal(Liferay 7.0 GA2
Here is the configuration I have done in portal-ext.properties file
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=smtp.sendgrid.net
mail.session.mail.smtp.password=**********( Generated API KEY)
mail.session.mail.smtp.port=587
mail.session.mail.smtp.user=apikey
mail.session.mail.store.protocol=smtps
mail.session.mail.transport.protocol=smtp
mail.smtp.starttls.enable=true
mail.transport.protocol=smtps
I am getting the following error,thouugh im giving proper details.
13:57:25,538 ERROR [liferay/mail-1][MailEngine:77] null
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at com.liferay.util.mail.MailEngine._send(MailEngine.java:554)
at com.liferay.util.mail.MailEngine.send(MailEngine.java:354)
at com.liferay.util.mail.MailEngine.send(MailEngine.java:429)
at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)
at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
at java.lang.Thread.run(Thread.java:745)
Please help me out.Regards,
Raju
I am trying to configure SMTP settings to send out emails from portal(Liferay 7.0 GA2
Here is the configuration I have done in portal-ext.properties file
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=smtp.sendgrid.net
mail.session.mail.smtp.password=**********( Generated API KEY)
mail.session.mail.smtp.port=587
mail.session.mail.smtp.user=apikey
mail.session.mail.store.protocol=smtps
mail.session.mail.transport.protocol=smtp
mail.smtp.starttls.enable=true
mail.transport.protocol=smtps
I am getting the following error,thouugh im giving proper details.
13:57:25,538 ERROR [liferay/mail-1][MailEngine:77] null
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at com.liferay.util.mail.MailEngine._send(MailEngine.java:554)
at com.liferay.util.mail.MailEngine.send(MailEngine.java:354)
at com.liferay.util.mail.MailEngine.send(MailEngine.java:429)
at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)
at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
at java.lang.Thread.run(Thread.java:745)
Please help me out.Regards,
Raju
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™