From:             [EMAIL PROTECTED]
Operating system: Windows 2000 Professional
PHP version:      4.1.0
PHP Bug Type:     Mail related
Bug description:  Access Violation with Cc header

While parsing the script displayed below, this error appears: 'PHP has
encountered an Access Violation at 01130A6E'.
This only happens when using the Cc header, in this script.
The IIS server it is running on will not respond after the PHP error.
Rebooting is the only way to restart the service.

PHP script causing error:

<?
/*
mail("[EMAIL PROTECTED]", "My Subject", "Line 1\nLine 2\nLine 3",
                 "From: webmaster@$SERVER_NAME\r\n"
                ."Reply-To: webmaster@$SERVER_NAME\r\n"
                ."X-Mailer: PHP/" . phpversion());
*/

/* recipients */
$to  = "Mary <[EMAIL PROTECTED]>" . ", " ; //note the comma
$to .= "Kelly <[EMAIL PROTECTED]>";

/* subject */
$subject = "Birthday Reminders for August";

/* message */
$message = '
<html>
<head>
 <title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
 <tr>
  <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
 </tr>
 <tr>
  <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
 </tr>
 <tr>
  <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
 </tr>
</table>
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";

/* additional headers */
$headers .= "From: Intranet <webmaster@$SERVER_NAME>\n";
$headers .= "Reply-To: Bart <[EMAIL PROTECTED]>\n";

$headers .= "Cc: [EMAIL PROTECTED]\n";

/* and now mail it */
mail("[EMAIL PROTECTED]", $subject, $message, $headers);

?>
-- 
Edit bug report at: http://bugs.php.net/?id=14944&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to