Day CQ Mail Service with Gmail as SMTP | Community
Skip to main content
Level 4
April 3, 2024
Solved

Day CQ Mail Service with Gmail as SMTP

  • April 3, 2024
  • 3 replies
  • 2372 views

Hi All,

 

I am trying to send email in AEM via CQ Mail Service and using below blog -

https://techrevel.blog/2023/06/12/utilizing-gmail-smtp-for-cost-free-email-transmission-from-aem/

 

But getting below errors -

1. Gmail - Port 587

EmailException: Sending the email to the following server failed : smtp.gmail.com:587

EmailException: Sending the email to the following server failed : smtp.gmail.com:587

MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587

SSLException: Unsupported or unrecognized SSL message

 

2. Gmail - Port 465

EmailException: Sending the email to the following server failed : smtp.gmail.com:465

EmailException: Sending the email to the following server failed : smtp.gmail.com:465

AuthenticationFailedException: 535-5.7.8 Username and Password not accepted.

https://support.google.com/mail/?p=BadCredentials

 

3. Yahoo - Port 465

EmailException: Sending the email to the following server failed : smtp.mail.yahoo.com:465

SMTPSendFailedException: 550 Request failed; Mailbox unavailable

SMTPSenderFailedException: 550 Request failed; Mailbox unavailable

 

4. Yahoo - Port 587

EmailException: Sending the email to the following server failed : smtp.mail.yahoo.com:587

EmailException: Sending the email to the following server failed : smtp.mail.yahoo.com:587

MessagingException: Could not connect to SMTP host: smtp.mail.yahoo.com, port: 587

SocketException: Connection reset

 

Any help @arunpatidar@estebanbustamante@imran__khan@aanchal-sikka,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Rohan_Garg

Hi @aem_noob,

 

Looks like authentication problem for Port 465 with Gmail.

For Yahoo, The 550 Response code could be because of any of the reasons listed in the How to Fix Yahoo Mail Error 550 Mailbox Unavailable

 

Can you try using a different SMTP provider? (Send Grid, Brevo, Mail Trap etc.)

I used Brevo for my local development and it works perfectly fine- 

Hope this helps!

 

Rohan Garg

3 replies

DPrakashRaj
Community Advisor
Community Advisor
April 3, 2024

Is it aem cloud service or ams/on-prem? In aem cloud service you need to configure proxy port but in ams/on-prem it should be straight forward.

aem_noobAuthor
Level 4
April 4, 2024

Its AMS

Level 2
April 4, 2024

For gmail-smtp ,you need to use app password, for that two step authentication should be already enabled. Create app password using the link -    https://myaccount.google.com/apppasswords

aem_noobAuthor
Level 4
April 4, 2024

I created the app password but still got the same issue

Rohan_Garg
Community Advisor
Rohan_GargCommunity AdvisorAccepted solution
Community Advisor
April 4, 2024

Hi @aem_noob,

 

Looks like authentication problem for Port 465 with Gmail.

For Yahoo, The 550 Response code could be because of any of the reasons listed in the How to Fix Yahoo Mail Error 550 Mailbox Unavailable

 

Can you try using a different SMTP provider? (Send Grid, Brevo, Mail Trap etc.)

I used Brevo for my local development and it works perfectly fine- 

Hope this helps!

 

Rohan Garg

aem_noobAuthor
Level 4
April 4, 2024

Its working with 3rd party SMTPs yes
But why would they not work with Gmail and Yahoo any pointers?

Adobe Employee
March 28, 2025

Hi @aem_noob I tried the same approach which has been mentioned here https://techrevel.blog/2023/06/12/utilizing-gmail-smtp-for-cost-free-email-transmission-from-aem/. I could make it work with my Gmail account. Are you still facing the same issue with Gmail?