|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46314 sending e-mail through SMTP fail
Submitted: 2008-10-16 12:51 UTC Modified: 2008-10-16 19:03 UTC
From: s_khreiss at hotmail dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.2.6 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: s_khreiss at hotmail dot com
New email:
PHP Version: OS:


 [2008-10-16 12:51 UTC] s_khreiss at hotmail dot com
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,


Reproduce code:
    function send_email($to, $subject, $message, $from, $name)

	    $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->WordWrap = 50;  // set word wrap
	    $mail->IsHTML(true);   // send as HTML

	    $mail->Subject  =  $subject;
	    $mail->Body     =  $message;
        $mail->AltBody     =  $message;

            	alert('error: send e-mail failed');
	       echo "Mailer Error: " . $mail->ErrorInfo;
            	alert('e-mail sent successfully');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-16 19:03 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Sep 28 21:01:25 2023 UTC