I need to send mail to the users of my website using php script. I have tried using mail function in php.
My code is as follows:
$to = \"myweb@gmail.co
Here's the link that gives me the answer and we use gmail:
Install the "fake sendmail for windows". If you are not using XAMPP you can download it here: http://glob.com.au/sendmail/sendmail.zip
Modify the php.ini file to use it (commented out the other lines):
For Win32 only.
SMTP = smtp.gmail.com
smtp_port = 25
For Win32 only.
sendmail_from = @gmail.com
For Unix only.
You may supply arguments as well (default: sendmail -t -i).
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
(ignore the "Unix only" bit, since we actually are using sendmail)
You then have to configure the "sendmail.ini" file in the directory where sendmail was installed:
smtp_server=smtp.gmail.com
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log
auth_username=
auth_password=
force_sender=@gmail.com