Proper format for PHP html email -
Proper format for PHP html email -
$email="jason@home.net"; $message= "callers name: ".$values["callname"]."\r\n"; $message="callers street address: ".$values["callstno"]."\r\n"; $message="street direction: ".$values["callstdir"]."\r\n"; $message="callers street name: ".$values["callstreet"]."\r\n"; $message="issue caller calling about: ".$values["callissue"]."\r\n"; $message="additional information: ".$values["callmisc"]."\r\n"; $message="callers phone number: ".$values["callphone"]."\r\n"; $message="date of call: ".$values["date"]."\r\n"; $message="person took phone call: ".$values["dataentry"]."\r\n"; $message="current status of call: ".$values["status"]."\r\n"; $subject="call citizen"; runner_mail(array('to' => $email, 'subject' => $subject, 'htmlbody' => $message, 'charset' => 'utf-8'));
when build sends email lastly line message $message="current status of call: ".$values["status"]."\r\n";
and value.
do need wrap message fields populated in email?
you've set , reset $message
several times. leave first $message
(the callers name one) , others, set $message .=
you should avoid using quotations both variables , echo otherwise risk re-opening echo variable call. alter variable calls single quotes so.
$email="jason@home.net"; $message = "callers name: ".$values['callname']."\r\n"; $message .="callers street address: ".$values['callstno']."\r\n"; $message .= "street direction: ".$values['callstdir']."\r\n"; $message .= "callers street name: ".$values['callstreet']."\r\n"; $message .= "issue caller calling about: ".$values['callissue']."\r\n"; $message .= "additional information: ".$values['callmisc']."\r\n"; $message .= "callers phone number: ".$values['callphone']."\r\n"; $message .= "date of call: ".$values['date']."\r\n"; $message .= "person took phone call: ".$values['dataentry']."\r\n"; $message .= "current status of call: ".$values['status']."\r\n"; $subject="call citizen"; runner_mail(array('to' => $email, 'subject' => $subject, 'htmlbody' => $message, 'charset' => 'utf-8'));
php html email
Comments
Post a Comment