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.

SMTP Email Not Working

Discussion in 'E-mail Discussions' started by Garrettj94, Oct 7, 2015.

  1. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    To start off, I am using the FormCraft WordPress plugin as my contact form. I am using SMTP settings, with gmail's SMTP: Host - smtp.gmail.com Port - 465/SSL. I made sure my email/username and password are correct and I keep getting this error: SMTP connect() failed. 0 email sent.

    I called my host (OVH) and they said there is no blacklisted IP or blocks for outgoing emails. I am a noob when it comes to email servers so I'm not sure where to go from here. Any help is appreciated.
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Do they allow you SSH access? If so, in SSH run:
    Code:
    # telnet smtp.gmail.com 465
     
  3. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    telnet: command not found
    :/
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Ah jailed shell.

    Can you try connecting to your own mail server, just use your domain as the host. If that doesn't work try port 25 and 587(TLS), just to see if for some reason 465 is being blocked.
     
  5. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    What do I put for the email/user/pass/port
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    You can test using your cPanel user.

    host: yourdomain.com
    user: cpuser@yourdomain.com
    password: cpuser password
    port: 465(SSL) 587(TLS) 25(Non SSL)

    Just try each one of those ports, starting with 465 to see if that specific port is the issue
     
  7. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    It's seems that there is an issues with the server firewall. Can you please try to disable server firewall for testing and check your plugin again.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You may need to consult further with your provider if you do not have root access to the system. Have them run that "telnet" command for you in the investigation.

    Thank you.
     
  9. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    I tried all 3 ports and they all took about 1 minute before showing the error: SMTP connect() failed.

    I have root access, but can't run that command. I can try calling them later today tho.
     
    #9 Garrettj94, Oct 8, 2015
    Last edited: Oct 8, 2015
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  11. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    # yum install telnet
    Loaded plugins: fastestmirror
    Existing lock /var/run/yum.pid: another copy is running as pid 8345.
    Another app is currently holding the yum lock; waiting for it to exit...
    The other application is: yum
    Memory : 50 M RSS (497 MB VSZ)
    Started: Thu Oct 8 14:52:51 2015 - 15:06 ago
    State : Sleeping, pid: 8345
     
  12. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Do you have root access then? I was under the impression you didn't as your cpanel access level says owner.
     
  13. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    Yeah I do, Idk what I choosed when I signed up
     
  14. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    Ok, I got telnet installed, then entered "telnet smtp.gmail.com 465":
    connected to smtp.gmail.com
    Escape character is '^]'.

    Also, OVH said port 465 & 587 are open, not filtered. They recommended checking log files, but not sure how to do that.
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Do you notice the same problem if you switch to port 25 (non-SSL) instead of port 465?

    Thank you.
     
  16. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    Its the same, shows an error after 2 seconds "SMTP connect() failed."
     
  17. lx24

    lx24 Member

    Joined:
    Oct 2, 2014
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The issue eventually with your server firewall. Can you try with disabling firewall? Have you installed CSF?
     
  18. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    My host said its not firewall, but I can try disabling it. How do I disable the firewall?
     
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can install a third-party firewall management utility such as CSF:

    ConfigServer Security & Firewall

    Then, since it manages your firewall rules, you can simply disable CSF through WHM instead of using the command line to manually turn off iptables.

    Thank you.
     
  20. Garrettj94

    Garrettj94 Active Member

    Joined:
    Oct 1, 2015
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Arizona
    cPanel Access Level:
    Website Owner
    Fixed. I signed up with MailJet and their SMTP works perfectly. Maybe it was an issue with my Google account.
     
Loading...

Share This Page