Jump to content

php mail() not working?


Lessur

Recommended Posts

I have this code:

 

<?php
if(isset($_POST['submit'])) {

$to = "Email here, blah";
$subject = "ALBUM REQUEST";
$name = $_POST['name'];
$email = $_POST['email'];
$add = $_POST['add'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$tel = $_POST['tel'];

$body = "From: $name\n E-Mail: $email\n Address: $add\n City: $city\n State: $state\n Zip: $zip\n Tel: $tel";

mail($to, $subject, $body);
echo "Thanks!  Data sent to $to";

} else {

echo "blarg!";

}
?>

 

and of course I have a form for this on another page, but for some reason, even when i get the confirmation text, it just doesn't send.  Why?

Link to comment
https://forums.phpfreaks.com/topic/61268-php-mail-not-working/
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.