PHP Scripts Development » General Web Development Forum

Changed server security stopped sending e-mails

(3 posts)

Tags:

  • Started 7 months ago by BungeeBones
  • Latest reply from Olaf

Great offers not only for geeks!


  1. My hosting company changed server security setting which stopped accessuserclass from using the usual php mail() function. The security change was implemented, I believe, using
    PHPSuExec. This is all new to me as I always just used the php mail function but my research is showing that PHPSuExec is being phased in quite alot on shared servers.

    If I am following your script correctly, all emails sent use the function send_mail() correct? And isn't it the line 968 below that is the one actually sending the mail?

    if (mail($mail_address, $subject, $body, $header))

    How can I change that to send using smtp instead of the php mail function?

    Thanks

    Posted 7 months ago #
  2. I was able to get it working.

    For future reference, I installed the PHPMailer_v2.0.0 folder in the same folder with access user class. I copied the contents of PHPMailer file named test1.php to line 967 (just above the line referenced in the above post).

    Change the "include path" to reference where you installed the PHPMailer script
    include_once('PHPMailer_v2.0.0/class.phpmailer.php');

    Comment out these two lines of the PHPmailer code
    //$body = $mail->getFile('contents.html');

    //$body = eregi_replace("[\]",'',$body);

    Change the "from" and "from name" fields

    Posted 7 months ago #
  3. Thanks for posting this solution. btw. great to see that there is a new version of phpmailer for php5.

    In the next version I will write a port to give the choice to the user which mail program is used to send the emails

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.