1

I have a problem with sending mail from PHP.

$to      = 'admin@****';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@****'  . "\r\n".
           'Reply-To: webmaster@****' . "\r\n" .
           'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers)

When I run this simple example script, or basically any tutorial script, I get the following error from hMailServer 554 Rejected - Message containing bare lf's.

I know this is due to a setting in hMailServer, but I don't want to turn off the RFC compliance check, I want to send correctly formatted mails.

Can you help me figure out what's wrong?

anno9
  • 13
  • 3

0 Answers0