Skip to main content

Phpmailer/zendmail cant send mail

Comments

13 comments

  • cPanelMichael
    Hello :) It's normal to see SELinux disabled by default, as it's not compatible with cPanel/WHM without a manual configuration. I'm not sure which tutorial you are following that advises enabling it to allow for sending email through PHP scripts, but it's not going to address the issue. Instead, do you notice any error messages in /var/log/exim_mainlog or /usr/local/apache/logs/error_log or in an error_log file within the account when attempting to send email through the PHP script? Thank you.
    0
  • Tocom
    Hello :) It's normal to see SELinux disabled by default, as it's not compatible with cPanel/WHM without a manual configuration. I'm not sure which tutorial you are following that advises enabling it to allow for sending email through PHP scripts, but it's not going to address the issue. Instead, do you notice any error messages in /var/log/exim_mainlog or /usr/local/apache/logs/error_log or in an error_log file within the account when attempting to send email through the PHP script? Thank you.

    This is the tutorial:
    0
  • Tocom
    I saw the log files and: error_log = only have messages about file dont exist and error 404; exim_mainlog = has a lot off info but not about this type of error.
    0
  • cPanelMichael
    Try comparing the output of the following commands between the two servers and see if you notice a difference on the server where PHP mail fails to send out:
    /usr/local/cpanel/bin/rebuild_phpconf --current php -v
    Thank you.
    0
  • Tocom
    Try comparing the output of the following commands between the two servers and see if you notice a difference on the server where PHP mail fails to send out:
    /usr/local/cpanel/bin/rebuild_phpconf --current php -v
    Thank you.

    I compare the two php version and the server 1 (that send email) is with php 5.5 and the server 2 (that not send mail) was with php 5.3, so I do an update to php 5.5 in easy apache > tweak tool, but still hava problem.
    0
  • cPanelMichael
    I compare the two php version and the server 1 (that send email) is with php 5.5 and the server 2 (that not send mail) was with php 5.3, so I do an update to php 5.5 in easy apache > tweak tool, but still hava problem.

    Did you run the first command to compare the PHP handlers? Thank you.
    0
  • Tocom
    Did you run the first command to compare the PHP handlers? Thank you.

    server 1 is suphp and the server 2 is fast cgi. the error is on server 2 with fast cgi. I will change it and report here.
    0
  • Tocom
    server 1 is suphp and the server 2 is fast cgi. the error is on server 2 with fast cgi. I will change it and report here.

    I change it to suphp and still have problem: connection time out. note: if I run the same script with smtp configurantion on xammp(my pc) it work fine, but when I upload the script to server do not work and get time out error.
    0
  • cPanelMichael
    It's highly likely this is an issue with your script that's outside our scope of support, however feel free to open a support ticket so we can take a look and determine if there are any obvious problems. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • Tocom
    seriously you will blame it on my script?
    0
  • Tocom
    seriously you will blame it on my script?

    Look, if I put this script on other server with the same configuration, and only change smtp login details will work fine.
    0
  • cPanelMichael
    Hello :) It's difficult to pinpoint any specific server configuration issues without access to the affected system. Thus, opening a support ticket would allow us to take a closer look and see if we notice anything out of the ordinary. While it's possible that it's a server configuration issue, there's no way for us to investigate further unless you open a support ticket. Feel free to post the ticket number here and we can update this thread with the outcome. Thank you.
    0
  • cPanelMichael
    Hello :) I've been unable to locate a support ticket for this issue. Were you able to open a support ticket or address the issue through another method? I look forward to your response. Thank you.
    0

Please sign in to leave a comment.