|
Posted by Neil on 12/05/05 22:45
I'm a PHP rookie so I'm hoping there may be a simple explanation for this
dilemma.
I'm trying to get a simple php script(below) to email a user's cell phone
from a simple web form.
It will mail to every other address I've tested, but not a cell phone. The
cell phone's address is in the format phone#@vmobl.com
<?PHP
$to = "##########@vmobl.com"; #set address to send form to
$subject = "Results from your test PHP script "; #email subject line
$headers = "From: Your Web Site"; #set the from address, or any other
headers
$forward = 1; # redirect once email is sent? 1 : yes || 0 : no
$location = "thanks.htm"; #set page to redirect to, if 1 is above
## Adds time and date to the email ##
$date = date ("l, F jS, Y");
$time = date ("h:i A");
## the message part of the email ##
$msg = "Below is the result of your feedback form. It was submitted on $date
at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location?Name=$name&Email=$email&Message=$message");
}
else {
echo "Thank you for submitting our form. We will get back to you as soon as
possible.";
}
?>
Do I need to use: $charset[0]="iso-8859-1"; ?
Any suggestions?
[Back to original message]
|