Help PHP Email script

the mail() function

Moderators: egami, macek, gesf

Post Reply
bachans
New php-forum User
New php-forum User
Posts: 67
Joined: Thu May 19, 2011 6:01 am
Location: India

Fri May 27, 2011 2:12 am

HI,

Nothing wrong in your code. You just bymistakely given different variable names.

Please change the code from
dopeamin wrote:$body = <<<EOD
<br><hr><br>
Email : $mail <br>
Name : $name <br>
Phone number : $phone <br>
What is your device : $device <br>
What is wrong :$wrong <br>
How did you find about us :$how <br>
EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
To
$body = <<<EOD
<br><hr><br>
Email : $mailField <br>
Name : $nameField <br>
Phone number : $phoneField <br>
What is your device : $deviceField <br>
What is wrong :$wrongField <br>
How did you find about us :$howField <br>
EOD;

$headers = "From: $mailField\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
Thanks
Bachan

Post Reply