0

こんにちは、エラーが発生し続けます。

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or 
custom "From:" header missing in C:\xampp\htdocs\

そして、php.ini の sendmail を次のように変更しました: sendmail_from = 12343OHBS@gmail.com

  $to='12343OHBS@gmail.com';//assigns the email address to the reciever part of the script
$subject='User Comments OHBS.com';
$header='test';
$name=($_POST['Name']);
$email=($_POST['Email']);
$Question=($_POST['MessageTitle']);
// the mail, the .= function is used to add more elements to the message array
$message="Name: $name\n\n";
$message.="Email: $email\n\n";
$message.="Comment or Question: $Question";
//Wordwrap to limit each line to 100 characters
$message=wordwrap($message, 100);
//Script to send the mail
$mailSent=mail($to,$header,$subject,$message);

助けてください!

4

1 に答える 1

0

xamppでstmpサーバーが構成され、実行されていることを確認してください。
sendmail_fromの値を引用符で囲んでみてください

sendmail_from = "from@example.com"

于 2009-10-21T07:28:26.943 に答える