Additional header problems with php function mail with a particular server -


i have email function in php:

function send_mail($to, $from, $objet, $message) { $entetemail  = 'mime-version: 1.0' . "\r\n";   $entetemail .= 'content-type: text/plain; charset=utf-8' . "\r\n";   $entetemail .= 'from: '.$from. "\r\n";   $entetemail .= 'cc: ' . "\r\n";   $entetemail .= 'bcc: ' . "\r\n";   $entetemail .= 'reply-to: '.$from .''. "\r\n";   $entetemail .= 'x-mailer: php/' . phpversion() . "\r\n" ;   $entetemail .= 'date: '. date("d, j m y h:i:s -0600");   return mail($to, $objet, $message, $entetemail);   } 

$to valid email address. $from looks like:

firstname name <email@example.com> 

$objet , $message come respectivelly input texte , textarea.

i've got no php errors , mail send me false back.

after echo, header looks on bothe servers:

mime-version: 1.0 content-type: text/plain; charset=utf-8 from: firstname name  cc:  bcc:  reply-to: firstname name  x-mailer: php/4.4.9 date: fri, 18 feb 2011 23:35:58 -0600 

on local server fine. on production one, line gives issue because of $from variable. email not send. have done wrong? there server configuration break everything?

it in fact work.

i did tests fake email addresses. seems production server didn't local didn't care.

i'd know how, i'll see later.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -