コード:
<?php
session_start();
$name = htmlspecialchars($_POST['name']);
$phone = htmlspecialchars($_POST['phone']);
$email = htmlspecialchars($_POST['email']);
$staddress = htmlspecialchars($_POST['staddress']);
$city = htmlspecialchars($_POST['city']);
$state = htmlspecialchars($_POST['state']);
$zipcode = htmlspecialchars($_POST['zipcode']);
$eventtype = htmlspecialchars($_POST['eventtype']);
$guests = htmlspecialchars($_POST['guests']);
$month = htmlspecialchars($_POST['month']);
$day = htmlspecialchars($_POST['day']);
$year = htmlspecialchars($_POST['year']);
$hourstart = htmlspecialchars($_POST['hourstart']);
$hourfinish = htmlspecialchars($_POST['hourfinish']);
$eventstreet = htmlspecialchars($_POST['eventstreet']);
$eventcity = htmlspecialchars($_POST['eventcity']);
$eventstate = htmlspecialchars($_POST['eventstate']);
$eventzip = htmlspecialchars($_POST['eventzip']);
$howwereu = htmlspecialchars($_POST['howwereu']);
$custmsg = htmlspecialchars($_POST['custmsg']);
$date = date('m-d-Y');
$to = '' . $email . '';
$subject = 'Thanks,' .$name . ' for requesting a quote!';
$message = "We will contact you as soon as possible! ";
$headers = 'From: no-reply@xxx.com' . "\r\n" .
'Reply-To: xxx@xxx.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
$to2 = 'xxx@xxx.com';
$subject2 = '' . $name . ' has requested a quote!';
$message2 = '
<html>
<head>
<title>Contact Email</title>
</head>
<body>
<p>Here is the information provided. If the field is blank, the customer did not fill out the
form.</p>
<table>
<tr>
<td>Customer Name:</td>
<td>' . $name . '</td>
</tr>
<tr>
<td>Customer Email:</td>
<td>' . $email . '</td>
</tr>
<tr>
<td>Customer Phone:</td>
<td>' . $phone . '</td>
</tr>
<tr>
<td>Customer Street Address:</td>
<td>' . $staddress . '</td>
</tr>
<tr>
<td>Customer City:</td>
<td>' . $city . '</td>
</tr>
<tr>
<td>Customer State:</td>
<td>' . $state . '</td>
</tr>
<tr>
<td>Customer Zipcode:</td>
<td>' . $zipcode . '</td>
</tr>
<tr>
<td>Event Type:</td>
<td>' . $eventtype . '</td>
</tr>
<tr>
<td># of Guests:</td>
<td>' . $guests . '</td>
</tr>
<tr>
<td>Event Month:</td>
<td>' . $month . '</td>
</tr>
<tr>
<td>Event Day:</td>
<td>' . $day . '</td>
</tr>
<tr>
<td>Event Year:</td>
<td>' . $year . '</td>
</tr>
<tr>
<td>Event Start Hour:</td>
<td>' . $hourstart . '</td>
</tr>
<tr>
<td>Event Finish Hour:</td>
<td>' . $hourfinish . '</td>
</tr>
<tr>
<td>Event Street:</td>
<td>' . $eventstreet . '</td>
</tr>
<tr>
<td>Event City:</td>
<td>' . $eventcity . '</td>
</tr>
<tr>
<td>Event State:</td>
<td>' . $eventstate . '</td>
</tr>
<tr>
<td>Event Zip:</td>
<td>' . $eventzip . '</td>
</tr>
<tr>
<td>How were you referred:</td>
<td>' . $howwereu . '</td>
</tr>
<tr>
<td>Customer Message:</td>
<td>' . $custmsg . '</td>
</tr>
</table>
</body>
</html>
';
$header2 = 'MIME-Version: 1.0' . "\r\n";
$header2 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$header2 .= 'From: no-reply@xxx.com' . "\r\n";
$header2 .= 'Reply-To: xxx@xxx.com' . "\r\n";
$header2 .= 'X-Mailer: PHP Version: 5.0+' . "\r\n";
mail($to2, $subject2, $message2, $header2);
header('Location: http://www.xxxx.com');
?>
電子メールを送信しません。以前は送信されていました。何が変わったの?ホスティング会社が知らないうちにphpなどを更新したのでしょうか?私は本当に迷っています。多分私は何か、おそらく構文を見落としました。皆さんが助けてくれることを願っています!前もって感謝します!