Sending email remotely via code or configuration

garbintecnologia

Active Member
Mar 4, 2021
33
2
8
Brasil
cPanel Access Level
Root Administrator
Hello,

I would like to know what is the most correct way to send remote email via code or third party software?

Example: A client of mine has a system for sending invoices, he would like to use the email authentication present in cPanel to carry out these messages.

I already made some settings here, but I don't feel 100% sure to say that this is right. It is being able to send emails, but without support for a secure connection (using tls or ssl), port 465 is being used to send.

I would like a guide to configure this issue on my server to use sending e-mails remotely and also to avoid spam or security breaches, is there any material explaining this or could you help me?

Thank's
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,160
2,408
363
cPanel Access Level
Root Administrator
Hey there! This more of a development or coding question than an email issue, but I'd recommend starting with a guide like this:


You'll definitely want to ensure the sessions are being authenticated to avoid the messages being marked as spam, and to ensure they are accepted by all servers.
 

garbintecnologia

Active Member
Mar 4, 2021
33
2
8
Brasil
cPanel Access Level
Root Administrator
Okay, is that when I tried to use SSL on the server to send e-mail it presented the message: "Error sending e-mail: SSL is not available on this server."

For this reason I thought that it could be some wrong configuration on my cPanel server.

The link you sent me is using port 465, will it always be this?

Thanks
 

garbintecnologia

Active Member
Mar 4, 2021
33
2
8
Brasil
cPanel Access Level
Root Administrator
Okay, I'm going to do a few more tests with code to try to use SSL/TLS. Actually the system that was tried to use SSL is from a client, so I don't have any details about the error, only the message that the server did not support SSL.

Thanks for listening