Jump to content

mail sends secound mail not the first........


redarrow

Recommended Posts

Advance thank you...

 

Hi there the problam is the first mail will not send but the secound does very weired.........

 

<?php
$mess="<center><h1>
NEW $enquire_type ENQUIRE</h1></center><br><br>
Name: $name <br><br> Telephone Number: $telephone <br><br>Client Email:
$email <br><br> client's enquire notes: $notes";

$to = 'admin@what_ever.co.uk';
$subject = 'Enquire off $enquire_type';
$message = $mess;
$headers = "From: Enquire@what_ever.co.uk\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";

if(mail($to, $subject, $message, $headers)){

echo"<br><br><br><br>Thank you $name for sending mail to us,<br>W
e will get back to you shortly!<br><br>";

$mess1="<br><br>Hi there $name, We are dealing with your 
enquire $enquire_type <br><br>
We will contact you via $telephone shortly <br><br>
thank you for using us at www.what_ever.co.uk<br><br>";

$to1 = $email;
$subject1 = 'Your Enquire '.$enquire_type.' Note!';
$message1 = $mess1;
$headers1 = "From: admin@what_ever.co.uk\r\n"
.'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
mail($to1, $subject1, $message1, $headers1);

exit;

}else{

echo"<br><br>Sorry where having problams with your 
email address <br><br> $email <br><br> Please cheek yo
ur email address and send agin thank you!....<br><br>";

exit;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/109653-mail-sends-secound-mail-not-the-first/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.