SOLVED Gmail "send mail as" using cPanel mail account auth error

kjdion84

Member
Apr 18, 2018
6
0
1
toronto
cPanel Access Level
Root Administrator
Getting the following error when I attempt to add a "send mail as" cpanel email account to gmail:

Server returned error: "535 Incorrect authentication data , code: 535"

I've verified the settings, tried both SSL and non-SSL. Still doesn't work.

The SMTP server works fine:
- using cpanel /webmail
- using PHP SMTP functions

I'm at a loss here. How do I get this to work in gmail?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
HI @kjdion84

First I would suggest ensuring that the password you're using with the email account is correct

When I added my own I used the following:

SMTP Server: mydomain.com
Username: [email protected]
Password: thepassword for [email protected]
Port: 587
Secured Connection using TLS checked

If this doesn't work for you, you may need to ensure that you're not being blocked by cPhulk or a firewall and that Gmail can connect to your server.

Gmail has a help article on how to set this up with them as well: Send emails from a different address or alias - Gmail Help

Thank you,
 

pitboo

Registered
Nov 7, 2019
2
0
1
Malaysia
cPanel Access Level
Root Administrator
Hi,
I am having the same problem, I have tried all the suggested way and still cannot get the result. Please help.
The error I always get

Couldn't reach server. Please double-check the server and port number.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Hi,
I am having the same problem, I have tried all the suggested way and still cannot get the result. Please help.
The error I always get

Couldn't reach server. Please double-check the server and port number.
Can you detail what you're doing when sending mail step by step?
 

pitboo

Registered
Nov 7, 2019
2
0
1
Malaysia
cPanel Access Level
Root Administrator
Hi,

Here are my steps:
1) Email Forwarder > forward to my email
2) Email Account > Connect devices
3) Go to Gmail > Settings > Account & Import > Send mail as : (add another email)
4)Pop Up > Enter Name and domain email > Next Step
5)SMTP Server (smtp.mydomain.com)(autoload) > port 587 > username & password ( Secured connect using TLS (recommended)) > Add Account
6) Error :
Server returned error: "DNS Error: 14865954 DNS type 'aaaa' lookup of smtp.mydomain.com responded with code NXDOMAIN 14865954 DNS type 'a' lookup of smtp.mydomain.com responded with code NXDOMAIN , code: 0"
Server returned error: "535 Incorrect authentication data , code: 535"

Either these two errors.
 

eddiesteyn

Registered
Nov 20, 2019
1
0
1
South Africa
cPanel Access Level
Root Administrator
Can you detail what you're doing when sending mail step by step?
Hi

Did you manage to get this working? And Gmail constantly gives me the "Couldn't reach server" error. However the settings all work perfectly in email clients. I also added the
suggested list of ips to my csf list, but still no luck.

BTW, I'm quite new to cpanel so might need some guidance.

Any ideas would be greatly appreciated.

Thanks
Eddie