Mail von localhost senden
Hi Leute
Ich benutze XAMPP auf Windows XP. Um die mail zu senden, lasse ich den apache server laufen und führe das php script aus.
Meine mail.php sieht so aus:
Zitat:
<?php
$headers = 'MIME-Version: 1.0' . '\r\n';
$headers .= 'Content-type: text/html; charset=iso-8859-1' . '\r\n';
$headers .= 'From:
from@from.com' . '\r\n';
mail('to@to.com','test subject','test body',$headers);
?>
php.ini:
Zitat:
[mail function]
; For Win32 only.
SMTP = mail.bluewin.ch
smtp_port = 25
; For Win32 only.
;sendmail_from =
test@test.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "\xampplite\sendmail\sendmail.exe -t"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
So und jetzt kriege ich aber immernoch einen error, und zwar folgenden:
Zitat:
Warning: mail() [
function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in
X:\xampplite\htdocs\mail.php on line
5
Mein Ziel ist es, möglichst anonym zu senden. Ich möchte eigentlich ungern meine eigene E-Mail hinterlassen. Zudem wollte ich fragen ob die Mail() funktion nur mit einem SMTP-Server funktioniert oder ob das auch irgendwie anders geht.
Vielen Dank