In VS 2022, I have built a simple html contact form linking to a php file to send an e-mail. There is no error returned by “mail($to,$subject,$message,$headers);” but the mail does not get dispatchted. I have devsense PHP tools installed and the php.ini file is C:\Program Files\IIS Express\PHP\v8.1\php.ini.
Windows 11 pro, 22H2, IIS 10.0.22621
Principally I am confident that the code with input from previous stackoverflow contributions is fine. The code runs successfully on notepad++ with the Apache Xampp server and my google account. In php.ini I have set
smtp_server = smtp.gmail.com
smt_port = 587
sendmail_from = me@example.com
sendmail_path ="\"C:\xampp\sendmail\sendmail.exe\" -t"
Accordingly, I have used these settings also in C:\Program Files\IIS Express\PHP\v8.1\php.ini. This ini file is now diverting to the sendmail.exe in my xampp/sendmail folder, but this seems not be correct for VS 2022. Any idea which settings to be made under VS 2022 and where to get the e-mail function working?