Setup email server host name on cPanel

kadarcoder

Registered
Apr 15, 2020
4
0
1
California
cPanel Access Level
Website Owner
Hi,

From cPanel, with the default email service setup, I can send the email settings to any existing email account. The receiving end sees an email from cpanel@somehost.somedomain.com that shows something like:

Username:someaccount@mail.somehost.somedomain.com
Password:Use the email account’s password.
Incoming Server:mail.somehost.somedomain.com
  • IMAP Port: 993
  • POP3 Port: 995
Outgoing Server:mail.somehost.somedomain.com
  • SMTP Port: 465
IMAP, POP3, and SMTP require authentication.

The question I have is:
How can I change the cpanel email server (i.e. Incoming Server and Outgoing Server) to somehost.somedomain.com instead of the default mail.somehost.somedomain.com?

The reason is that somehost.somedomain.com is a registered DNS host, but mail.somehost.somedomain.com is not (and not known from outside the domain).

Thanks!
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
599
273
138
IN
cPanel Access Level
Root Administrator
If somehost.somedomain.com is a registered DNS host and points correctly to the server IP from which you wish to use your email service then you can use somehost.somedomain.com as Incoming Server and Outgoing Server, It should connect. Give a try.

Make sure SSL is installed for somehost.somedomain.com as you are connecting to secure ports.
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
The system picks the most secure domain to display here. So if the hostname of the server has an SSL and the domain you're referencing doesn't the hostname is selected.
 

kadarcoder

Registered
Apr 15, 2020
4
0
1
California
cPanel Access Level
Website Owner
I tried to connect to somehost.somedomain.com (since mail.somehost.somedomain.com doesn't work) via SMTP port 587 using PHPMailer, and it seems to connect only without TLS. However, I could not send mail via PHPMailer, with 'Error: Could not authenticate.' I'm sure the username and password are correct.

In the case of Gmail, I had to change "Allow less secure apps: ON" in Gmail to pass the PHP Mailer authentication problem.

Is there something in cPanel that I can set to pass the PHPMailer authentication process?
Also, is there a cPanel setting to enable TLS for SMTP?

Thanks!
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! cPanel has TLS enabled for SMTP by default over port 465, so there isn't anything special that you need to configure to make that work. Could you try using that port instead to see if that gets things working?

As far as the "PHPMailer authentication process," that would just be up to the connection settings. I would expect that to connect as a valid user.