PHP sends mail through windows, causing it to freeze after sending email

we are starting to create a web application. My colleague is developing on linux, and I am running through the WAMP stack running Windows XP. We use Zend.

When we submit the form and send the email using Zend's email, the email is sent, and then I get a blank screen, and on the Linux machine the application will continue as usual.

So, I wrote my little script, mail.php, which uses phpmailer - and the same thing happens, an email is sent, and then a blank screen. So we have:

if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent";
}

Thus, error messages are not reported, an email is sent, but the “Message Sent” never prints on the screen (or anything else, plain HTML too).

, , . - php Windows, ?

SMTP .

+5
4

, . , SMTP-. , - , , php smtp .. . .

.

0

, , . , -

ini_set( 'display_errors', 1 );
error_reporting( E_ALL );

apache 500 .

+1

PHP , . ,

<?php
phpinfo();
?>

PHP Core - , php.ini log_errors , , .

, , , .

UPDATE

- , , Zend_Mail PHP mail() : http://framework.zend.com/manual/en/zend.mail.html

, PHP mail() PHP, SendMail http://www.php.net/manual/en/ref.mail.php ( ) WAMP * nix - , , mail(); -)

+1

phpmailer ( dev). ? - . , , openssl php, ssl. . , SMTPDebug , .

<?php

$mail             = new PHPMailer();

$mail->IsSMTP();
$mail->Host       = "blah.com";
$mail->SMTPDebug  = 1;
$mail->SMTPAuth   = true;
$mail->SMTPSecure = "ssl";
$mail->Host       = "mail.blah.com";
$mail->Port       = 465;
$mail->Username   = "noreply@blah.com";
$mail->Password   = "smtppass";

$mail->SetFrom('noreply@blah.com', 'Blah Name');
$mail->AddReplyTo("noreply@blah.com", "Blah Name");
$mail->Sender = "noreply@blah.com"

?>
+1
source

All Articles