Bonjour,
Voila j'ai un soucis, j'ai fait un script php, losque je le lance via IE ca passe et les mails partent sans soucis mais si je lance avec invite de commande (php.exe monscript.php) j'ai une erreur :
avec dans mon php.iniWarning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing .
et mon script php :[mail function]
; For Win32 only.
SMTP = smtp.wanadoo.fr
; For Win32 only.
sendmail_from = xxx@wanadoo.fr
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 $fromname="x@y.com"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-MSMail-Priority: Normal\n"; $headers .= "X-Mailer: php\n"; $headers = "From: \"".$fromname."\" <".$fromname.">\n"; mail($exp_mess, 'test', 'test', $headers);
Partager