cancel
Showing results for 
Search instead for 
Did you mean: 

SMTP settings not working

Former Member
0 Kudos

HI

I am using below SMTP settings but its not working

mail.from=username@gmail.com

mail.replyto=username@gmail.com

mail.smtp.server=smtp.gmail.com

mail.smtp.port=465

mail.smtp.user=username@gmail.com

mail.smtp.password=xxxxxx

mail.use.tls=true

mail.smtp.starttls.enable=true

I have tried with port number 25 and 587 as well but stil its not working.

I am getting below error

EVERE: Servlet.service() for servlet [springmvc] in context with path [/sampleworkflow] threw exception [Request processing failed; nested exception is de.hybris.pl .exceptions.ActivationWorkflowActionException: Sending the email to the following server failed : smtp.gmail.com:465] with root cause de.hybris.platform.workflow.exceptions.ActivationWorkflowActionException: Sending the email to the following server failed : smtp.gmail.com:465 at de.hybris.platform.workflow.strategies.impl.DefaultActionActivationStrategy.doAfterActivation(DefaultActionActivationStrategy.java:45) at de.hybris.platform.workflow.impl.DefaultWorkflowProcessingService.activate(DefaultWorkflowProcessingService.java:105) ................................

Can anyone please help on this?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, Some time it expect password too (mail.smtp.password=xxxxxxx), please provide valid password for your gmail id. You can test the email locally with Papercut app.

Former Member
0 Kudos

In order to get the tls authentication working I had to enable the 2-Step Verification from gmail here and then I also used this config in local.properties

mail.from=username@gmail.com

mail.replyto=username@gmail.com

mail.smtp.server=smtp.googlemail.com

mail.smtp.port=587

mail.smtp.auth=true

mail.smtp.debug=true

mail.smtp.user=username@gmail.com

mail.smtp.password=yourpassword

mail.use.tls=true

mail.smtp.starttls.enable=true

After using above settings the email worked as expected.

Former Member
0 Kudos

TLS enabled port is 587 SSL port is 465..

Make sure you turn on or off the tls depending on port numbers

Former Member
0 Kudos

Hi Aarthy

Thanks for your reply. I am using below settings

mail.smtp.server=smtp.gmail.com

mail.smtp.port=465

mail.smtp.user=username@gmail.com

mail.smtp.password=xxxxxxx

mail.use.ssl=true

mail.from=username@gmail.com

mail.replyto=username@gmail.com

But still its not working.

Can you please advise.

Former Member
0 Kudos

You should try : - port 587 - replace mail.use.ssl=true with mail.use.tls=true

as Aarthy suggested.

Former Member
0 Kudos

mail.smtp.port=465 mail.smtp.starttls.enable=false

(or)

mail.smtp.port=587 mail.smtp.starttls.enable=true