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: smtp.gmail.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1949)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at com.shephertz.app42.paas.app42.email.App42EmailNotifier.notify(App42EmailNotifier.java:126)
at com.shephertz.app42.paas.app42.email.EmailListener.serviceMail(EmailListener.java:181)
at com.shephertz.app42.paas.app42.email.EmailListener$1.run(EmailListener.java:138)
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
Thanks