PHP ver gevorderde |
|
Ik probeer een mail te versturen (vanaf localhost), maar ik krijg de volgende error:
Citaat: Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:serverxampphtdocsessmodulesclass.contact.inc.php on line 35
Stukje in php.ini:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = "timo.maas@orange.nl"
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "C:\server\xampp\sendmail\sendmail.exe -t"
; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. sendmail_from = "timo.maas@orange.nl" ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path = "C:\server\xampp\sendmail\sendmail.exe -t"
en m'n headers:
<?
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Return-Path: Mail-Error <timomaas93@gmail.com>\r\n";
$headers .= "Reply-To: ".$_POST['fromname']." <".$_POST['frommail'].">\r\n";
$headers .= "From: ".$_POST['fromname']." <".$_POST['frommail'].">\r\n";
<? $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "Return-Path: Mail-Error <timomaas93@gmail.com>\r\n"; $headers .= "Reply-To: ".$_POST['fromname']." <".$_POST['frommail'].">\r\n"; $headers .= "From: ".$_POST['fromname']." <".$_POST['frommail'].">\r\n";
Maar als ik die echo krijg ik die stukjes tussen <> er op de pagina niet bij maar in de bron wel (staan immers tussen <>)
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
Return-Path: Mail-Error <timomaas93@gmail.com>
Reply-To: timo <timomaas93@gmail.com>
From: timo <timomaas93@gmail.com>
MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 Return-Path: Mail-Error <timomaas93@gmail.com> Reply-To: timo <timomaas93@gmail.com> From: timo <timomaas93@gmail.com>
Wat doe ik fout?
|