From: s_khreiss at hotmail dot com Operating system: Windows XP PHP version: 5.2.6 PHP Bug Type: Mail related Bug description: sending e-mail through SMTP fail
Description: ------------ Dear, In our Website we have an option to send an e-mail..where I'am using the send_email function to send via SMTP. the function was working correctly and e-mails were sent, but today when trying to send an e-mail, it gives me: 'error: send e-mail failed. SMTP is up and running. (we re-start it and we re-start the IIS server but nothing change) please I need help to know why mail are not sent. (here is the function) thank you, Sincerely, Reproduce code: --------------- function send_email($to, $subject, $message, $from, $name) { require("includes/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = "localhost"; // SMTP servers $mail->SMTPAuth = false; // turn on SMTP authentication $mail->From = $from; $mail->FromName = $name; $mail->AddAddress($to);// optional name $mail->AddReplyTo($to,""); $mail->WordWrap = 50; // set word wrap $mail->IsHTML(true); // send as HTML $mail->Subject = $subject; $mail->Body = $message; $mail->AltBody = $message; if(!$mail->Send()) { print"<script> alert('error: send e-mail failed'); window.close() </script>"; echo "Mailer Error: " . $mail->ErrorInfo; } else { print"<script> alert('e-mail sent successfully'); window.close() </script>"; } } -- Edit bug report at http://bugs.php.net/?id=46314&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46314&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46314&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46314&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46314&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46314&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46314&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46314&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46314&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46314&r=support Expected behavior: http://bugs.php.net/fix.php?id=46314&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46314&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46314&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46314&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46314&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46314&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46314&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46314&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46314&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46314&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46314&r=mysqlcfg