How Emails and SMTP Works in Cyber Panel & OLS?

Hello,

Recently I Created a Digital Ocean Droplet > Installed Cyber Panel + OLS Using SSH.

Created a Website Under Cyber Panel

Created Email ID for that Site Under Cyber Panel

Now Able to Send Emails From Rainloop Web Email Provided by Cyber Panel.

Created DKIM + SPF in Digital Ocean Domain Settings ( Copied Records from Cyber Panel )

After Records Created in Digital Ocean, I send some Mails from Rainloop.

All That Emails Verified and Signed.

The receiver Can See, Mailed by and Signed by Details.

Till, This everything is fine ( I think ).

Correct?

OK…

Now, The Problem.

I wish to send emails from my website.

So, there I need a few things.

1 - SMTP Host

2 - Port

3 - User ID

4 - Password

I know User ID and Password, which I’m using to Login in Rainloop.

Port mostly 465 and 587 ( I saw this in SSH, once OLS Installation Finished )

But, SMTP Host…

When I checked Records under DNS, I could see " mail.mydomain.com "

most f the situation, that’s correct.

that should be correct, because from there only I took DKIM and SPF, they worked good.

So,

I added mail.mydomain.com in Digital Ocean as A records.

then,

goto my web application.

and put these settings

SMTP - mail.mydomain.com

Port - 465

User Name - support@mydomain.com

password - secret password


But, My web App saying - Unable to connect to host.

What I missed to do?

mail.mydomain.com should be created in Digital Ocean as A Record or TXT?

or as CNAME?

Only I have confusion on this…

Maybe the error is something else.

I have described almost everything I know…

kindly help me to sort out the issue…

Thanks.

I have seen a Similar Question in Cyber Panel Before Few Months, Not Yet Addressed by the Team.

a quick google yielded this result - Digital Ocean Firewall blocking sending Email | DigitalOcean

I think the issue is with the rDNS.
The app in which you are sending emails does not recognize the domain based on the IP.
Change your default DO rDNS with your actual rDNS which is mail.yourdomain.com
Hope This helps.

Also, use port 587 instead 465.