Sending email in PHP using mail() function
Copy below code at space around smtp word in php.ini file:
SMTP=smtp.gmail.com
smtp_port=587
[email protected]
sendmail_path="C:\xampp\sendmail\sendmail.exe -t"
mail.add_x_header=On
Save changes and close file.
In sendmail configuration file ,do following changes:
smtp_server=smtp.gmail.com ( change server)
smtp_port=587 (change port number)
smtp_ssl=tls
error_logfile=error.log
debug_logfile=debug.log (remove comment from here)
auth_username='ur email id'
auth_password=‘ur email password’
force_sender='ur email id'
Save changes and close file.