Email service not working via APP42 using Gmail SMTP

0 votes

Hello Guys,

I am trying to send the email using App42 email services. I have added the Gmail SMTP credentials in and after that Itried to send a test mail using the PHP code and it returns a success message. But when I check the logs I don't get and logs for the mail that I had sent using the PHP code.
Otherwise, when I tried to compose a mail from the App42 to console I get the message of Email sent success fully. But when I see in the logs I get the following error

Error : javax.mail.MessagingException: Could not connect to SMTP host:, port: 465, response: -1
	at com.sun.mail.smtp.SMTPTransport.openServer(
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(
	at javax.mail.Service.connect(
	at javax.mail.Service.connect(
	at javax.mail.Service.connect(
	at javax.mail.Transport.send0(
	at javax.mail.Transport.send(

Even I have  Allow less secure apps: ON and enable the IMAP and SMTP from the gmail account setting.
Kindly help and let me know where I am going wrong


asked Apr 3, 2018 in PHP by priyesh.axovel (11 points)

1 Answer

+1 vote

Hi Priyesh,


Could you please try to use the port no 587 instead of 465 in email configuration setting and send the email through this configuration setting.

In case if the issue still continues, please do feel free to reach out to us.

We will be happy to help you.



Priyanka Singh

App42 Team

answered Apr 4, 2018 by anonymous
Thanks, Priyanka
I was a great help.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on