The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to send email using PHP SMTP

Discussion in 'E-mail Discussions' started by rooye, Jul 7, 2015.

  1. rooye

    rooye Member

    Joined:
    Jul 7, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
    #1 rooye, Jul 7, 2015
    Last edited by a moderator: Jul 9, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

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

    Thank you.
     
  3. rooye

    rooye Member

    Joined:
    Jul 7, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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 (newsletters@domain.org) 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
     
    #3 rooye, Jul 9, 2015
    Last edited by a moderator: Jul 9, 2015
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. rooye

    rooye Member

    Joined:
    Jul 7, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. rooye

    rooye Member

    Joined:
    Jul 7, 2015
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cameroon
    cPanel Access Level:
    Website Owner
    Hi Sir,

    I used SMTP except that I don't understand your question well.Thanks for your continuous concern.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page