Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

PHP Mailer with Gmail SMTP works one day and stops the next day

Discussion in 'E-mail Discussions' started by ASLAN OZCAKIR, Sep 21, 2017.

  1. Aslan Ozcakir

    Aslan Ozcakir Registered

    Joined:
    Sep 21, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    ISTANBUL
    cPanel Access Level:
    Root Administrator
    Hello,

    I have an issue with sending emails using PHPMailer + Gmail SMTP:

    I have exactly the same code from PHPMailer using smtp.gmail.com and 587 port with TLS.
    When I do a grace reboot and run the script it works fine and sends the email immediately without an issue. (I am also testing it with smtp.yandex.com it works as well).

    However, the next day when I run the same script I got "SMTP connect () failed." error.

    Any ideas how to debug this issue? I do not want to reboot the server everyday.

    Thanks in advance for your suggestions.
    Sincerely,
    Aslan Ozcakir
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Is "WHM Home » Security Center » SMTP Restrictions" enabled on this system, or is the "SMTP_BLOCK" option enabled in your CSF configuration (if CSF is installed)?

    Thank you.
     
Loading...

Share This Page