Unable to send email using PHP SMTP

rooye

Member
Jul 7, 2015
6
0
1
Cameroon
cPanel Access Level
Website Owner
hi everyone

i just wrote a php script using cogeigniter to send newsletters.about 8 days ago i could send the emails in html format without any problem.however, i have suffered for the past 3days or so with this error message:

Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

I configured smtp and the message is:

Code:
Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/answer/14257 y5sm23351674ywc.11 - gsmtp
from: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/answer/14257 y5sm23351674ywc.11 - gsmtp

The following SMTP error was encountered: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 https://support.google.com/mail/answer/14257 y5sm23351674ywc.11 - gsmtp
to: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/answer/14257 y5sm23351674ywc.11 - gsmtp
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

I seriously need your help from this difficulty.Thanks
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

Are you authenticating with a username/password combination that matches what you created under "Email Accounts" in the cPanel interface?

Thank you.
 

rooye

Member
Jul 7, 2015
6
0
1
Cameroon
cPanel Access Level
Website Owner
Hi
Yes, in the cpanel "Email Accounts" section, i created a number of emails accounts(7 to be exact).I took one of them ([email protected]) and it associated password and used.I had first gone to configure email client of the account in question.There i saw recommended settings for Secure SSL/TLS Settings.everything including the username and password, SMTP Port: 465,etc.However the following error keeps coming.Among other things I see

Failed to authenticate password. Error: 534-5.7.9
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Thanks
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

The message suggests you are attempting to authenticate to Google's mail service with your email account username/password. Have you tried accessing Webmail through cPanel to verify the password works with that? Why is your script configured to send through Google, but not using a Google email account?

Thank you.
 

rooye

Member
Jul 7, 2015
6
0
1
Cameroon
cPanel Access Level
Website Owner
Hi,
I am extremely greatful for your efforts to get me out of this difficulty.The thing is that because of this prob i tried different things.As you said,I had to create a new google account to use it username/password for the configuration.It still didn't work.I've tried using the username/password for an email account that is working on webmail of my server but yet it still didn't work.I am not sure of what I need to configure or what to do.
Thanks for your help
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
I've tried using the username/password for an email account that is working on webmail of my server but yet it still didn't work
It's likely not an issue with the email account on the cPanel server, since as you said, it works fine with Webmail. What are you using as the mail server name in your application?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
For instance, in the script you are using, there should be a location where you configure the mail server name that you are using for the SMTP connection. What are you entering for that entry (e.g. Google's mail server name)?

Thank you.