Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SMTP Configuration to connect to gmail

vijayai43980660
Level 1
Level 1

Hi,

Please let me know the SMTP configuration that needs be configured in Day CQ Mail Service to connect to gmail.

I have tried the following

# Configuration created by Apache Sling JCR Installer

smtp.password="my gmail account password"

debug.email=B"false"

smtp.port=I"465"

smtp.user="username"

smtp.ssl=B"false"

from.address="my gmail id"

smtp.host="smtp.gmail.com"

I have tried the port numbers both 465 and 587.

https://myaccount.google.com/lesssecureapps . I have turned on this setting as well. But I am not able to connect getting the connection refused error.

Please help me in this regard.

Thanks in advance

Regards,

Vijaya

2 Replies
Arun_Patidar
Community Advisor
Community Advisor

Hi ,

Can you try to enable SSL?

Below is google smtp relay servers details

Fully qualified domain name of SMTP service
smtp-relay.gmail.comsmtp.gmail.comaspmx.l.google.com
Configuration options
  • Options: Port 25, 465, or 587
  • Secure Socket Layer (SSL)/Transport Layer Security (TLS) protocols.
  • Dynamic IPs are allowed, but a static IP might be required due to authentication requirements.
  • Port 465 (SSLrequired)
  • Port 587 (TLS required)
  • Dynamic IPs allowed
  • Port 25
  • TLS not required
  • Dynamic IPs allowed
  • Mail can only be sent to Gmail or G Suite users.

Can you check STEP 2 also at Send email from a printer, scanner, or app - G Suite Administrator Help

Thanks

Arun

smacdonald2008
Level 10
Level 10

Try writing your own email serve using Java MAIL API. See if that works for  your use case. See this article -- Scott's Digital Community: Creating custom CQ email services

For some reason - gmail and MessageServiceGateway seems to produce issues.