This is pretty cool, so XAMPP on windows can actually send emails. All you need is to have a gmail account and to configure a couple INI files. Contrary to what you might think you don't actually need the Mercury email service running from the XAMPP control panel.
PHP.ini is in C:\xampp\php\php.ini
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"Again the lines mentioned make sure they are uncommented that is without the semicolon ; in front of them. So open the sendmail.ini file located at C:\xampp\sendmail\sendmail.ini. Open in your code editor.
smtp_server, uncomment the line and use this: smtp_server=smtp.gmail.comsmtp_port uncomment that if need and use: smtp_port=587auth_username= and add your username to the end of it: auth_username=kittycat91 (no need to use the @gmail.com on there) auth_password use: auth_password=Your$#Bleeping#1$PaSSwOrdYou are going to get an alert email from google, because gmail has this feature disabled by default. The first time you press send on your new webform on localhost if your form is actually working, you'l get a email in your gmail inbox warning email that says something like: “Review blocked sign-in attempt” In the email you get, the solution to allow it is in there at the bottom.
<box 80% | Are you the one who tried signing in?> Google will continue to block sign-in attempts from the app you're using because it has known security problems or is out of date. You can continue to use this app by allowing access to less secure apps, but this may leave your account vulnerable. </box>
So you'll click that link and then it will take you to a settings page. Enable it, but later you'll probably want to turn this off to further protect your gmail account.