1CONFIGURE THESE SETUPS:
2
3in your php.ini:
4SMTP=smtp.gmail.com
5smtp_port=587
6sendmail_from = my-gmail-id@gmail.com
7sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
8
9
10in your sendmail.ini
11smtp_server=smtp.gmail.com
12smtp_port=587
13error_logfile=error.log
14debug_logfile=debug.log
15auth_username=my-gmail-id@gmail.com
16auth_password=my-gmail-password
17force_sender=my-gmail-id@gmail.com
18
1Although there are portions of this answer that apply to only to the usage of themail() function itself, many of these troubleshooting steps can be applied to any PHP mailing system.
2
3There are a variety of reasons your script appears to not be sending emails. It's difficult to diagnose these things unless there is an obvious syntax error. Without one you need to run through the checklist below to find any potential pitfalls you may be encountering.