freshwire
02-03-2009, 18:23
Some mail server work much better with just "\n" instead of "\r\n" see which works best for you
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
ini_set('sendmail_from', 'me@domain.com'); //Suggested by "Some Guy"
mail($recipient, $subject, $mail_body, $header); //mail command :)
?>
$headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if (!mail($CONTACT_ALL, $CONTACT_SUBJECT, $this->contactHeader().$this->message.$this->toString(), $headers)) { $this->errors["email"] .= "Failed to send the message :("; }