da ich im englischsprachigen Forum keine Antwort mehr bekommen habe versuche ich es nochmal hier.
GEstern habe ich die neueste Xampp Version installiert, auf Windows10. Ich scheitere an der konfiguration von sendmail. Nicht zum ersten mal, ich habe es in den letzten Jahren schon nicht geschafft das zum Laufen zu bekommen. Diesmal wäre es mir aber wichtig.
Hier die Konfig:
PHP.INI
- Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP=smtp.gmail.com
; http://php.net/smtp-port
;smtp_port=587
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = raspma1701@gmail.com
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = "C:\xampp\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().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
;mail.add_x_header=Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
;mail.log = "C:\xampp\php\logs\php_mail.log"
;mail.log = "\xampp\apache\logs\php_mail.log"
SENDMAIL.INI
- Code: Select all
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=xxxxx@gmail.com
auth_password=xxxxx
force_sender=xxxxx@gmail.com
PHP
- Code: Select all
$subject = "Unsere erste E-Mail";
$to = "email@email.xyz";
$body = "send this email";
if( mail($to, $subject, $body) ) {
echo "ok";
} else {
echo "not ok";
}
In der php.ini ist so ziemlich alles auskommentiert. Ich bin verschiedenen Anleitungen gefolgt die sich alle in einzelnen Details unterscheiden.
Wie lautet die korrekte Konfiguration so, dass es auch funktioniert?
Vielen Dank.