Re: Mail & Header Redirect

From: Date: Tue, 05 Oct 2004 16:34:27 +0000
Subject: Re: Mail & Header Redirect
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-36613@lists.php.net to get a copy of this message
When I echo $sent, it returns 1. Thanks, Valerie ----- Original Message ----- From: "Bastien Koert" <bastien_k@hotmail.com> To: <Valerie1230@neo.rr.com>; <php-db@lists.php.net> Sent: Tuesday, October 05, 2004 10:03 AM Subject: RE: [PHP-DB] Mail & Header Redirect
if you echo $Sent, what do you get? bastien
From: "Valerie" <valerie1230@neo.rr.com> To: <php-db@lists.php.net> Subject: [PHP-DB] Mail & Header Redirect Date: Tue, 5 Oct 2004 08:24:26 -0400 I have an email that is sent upon submission of a form. I need to redirect to a confirmation page if email is sent successfully. I thought the problem was that my email headers are already being sent, but when I removed them it still did not work. I need to bcc as well. headers: <?php function mailsent(){header("location: http://www.justustwo.com/vals/thankyou.html");exit();} And mailing: /*Mailing*/ $to="valeriejason@neo.rr.com"; $subject="AVC received a quote request!"; $message="
    <H3 align='center'>AVC received a quote request from $name</h3>
     <h4><table cellpadding='5' cellspacing='0' align='center' border='1'>
     <tr>
     <td>Email:</td>
     <td>$email</td>
     </tr>
     <tr>
     <td>Phone:</td>
     <td>$phone</td>
     </tr>
     <tr>
     <td>Indoors/Outdoors:</td>
     <td>$where</td>
     </tr>
     <tr>
     <td>Type of Stock:</td>
     <td>$m</td>
     </tr>
     <tr>
     <td>Quantity:</td>
     <td>$quantity</td>
     </tr>
     <tr>
     <td>Sides:</td>
     <td>$s</td>
     </tr>
     <tr>
     <td>Colors:</td>
     <td>$colors</td>
     </tr>
     <tr>
     <td>Finishing:</td>
     <td>$finish</td>
     </tr>
     <tr>
     <td>Comments:</td>
     <td>$c</td>
     </tr>
     </table></h4>";
/* set the Content-type header. */ $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n\r"; /* additional headers */ $headers .= "From:AVCQuoteRequest"; $headers .= "Bcc: valerie1230@neo.rr.com"; $sent=mail($to,$subject,$message,$headers); if ($sent) {
    mailsent();
} else {
    $errormessage="<h2 class=\"error2\">**There was an error. Please call 1-800-548-4449</h2>";
    echo $errormessage;
    exit;
}
_________________________________________________________________ Scan and help eliminate destructive viruses from your inbound and outbound e-mail and attachments. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.


« previous php.db (#36613) next »