Here is my config:
php.ini
[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
mtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=myemail@gmail.com
auth_password=mypassword
force_sender=myemail@gmail.com
the script:
- 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";
}
I dont even get an error message. yes, error_reporting is on.
Xampp 7.3.3 on Windows 10
Whats wrong with the configuration?