0

我只是想制作一个脚本来将表单中的结果发送给我的电子邮件。它正在工作,但现在它甚至没有发送电子邮件。任何人都可以发现为什么?谢谢!!我已经经历了 100 次,我看不出有什么问题......

`

/* Subject and Email Variables */

$emailSubject = 'Membership Submission from Form';
$webMaster = 'testemail@gmail.com';

/* Gathering Data Variables */

$nameField = $_POST['name'];
$membershipField = $_POST['membership'];
$addressField = $_POST['address'];
$cityField = $_POST['city'];
$provinceField = $_POST['province'];
$postalcodeField = $_POST['postalcode'];
$telhomeField = $_POST['telhome'];
$telcellField = $_POST['telcell'];
$telofficeField = $_POST['teloffice'];
$emailField = $_POST['email'];
$commentsField = $_POST['comments'];

$body = <<<EOD
Name: $name <br>
Membership Type: $membership <br>
Address: $address <br>
City: $city <br>
Province: $province <br>
Postal Code: $postalcode <br>
Tel Home: $telhome <br>
Tel Cell: $telcell <br>
Tel Office: $teloffice <br>
Email: $email <br>
Comments: $comments <br>
EOD;


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

/* Results rendered as html */

$theResults = <<<EOD

EOD;
echo "$theResults";


?>` 
4

0 回答 0