-1
我正在使用此函數發送電子郵件,但這並沒有工作..PHP發送郵件幫助
怎麼了? =(
<?php
$SMTP = "mailer2.mondoweb.it";
$TO = "[email protected]";
function InviaMail($subject, $body, $hdrs) {
global $SMTP, $TO;
ini_set("SMTP", $SMTP);
mail($TO, $subject, $body, $hdrs);
}
$subject = "Clevery. Richiesta informazioni su: ". $_POST['offerta'] .".";
$body = "Clevery. Richiesta informazioni su: ". $_POST['offerta'] ."<br><br>" .
"Nome cliente: " . $_POST['nome'] . "<br>" .
"Email: " . $_POST['email'] . "<br>" .
"Referente: " . $_POST['referente'] . "<br>" .
"Città: " . $_POST['citta'] . "<br>" .
"Provincia: " . $_POST['provincia'] . "<br>" .
"Telefono: " . $_POST['telefono'] . "<br>" .
"Note: " . $_POST['commento'] . "<br>";
$hdrs = "Content-Type: text/html; charset=iso-8859-1\n" . "From: " .
"\"clevery.it\" <[email protected]>";
InviaMail($subject, $body, $hdrs);
?>
你的服務器有sendmail或者什麼東西等同於發送電子郵件嗎?:) – Awea
什麼是錯誤信息或至少是症狀! – Sydwell
絕對沒有。沒有錯誤,沒有。郵件不發送。這真讓我抓狂! –