note 118210 deleted from function.mail by crell
| From: | crell@php.net | Date: | Tue, 12 Apr 2022 01:10:22 +0000 |
| Subject: | note 118210 deleted from function.mail by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218234@lists.php.net to get a copy of this message | ||
Note Submitter: jimmytrojan009 at gmail dot com
----
I have tried many online tutorials to get mail() function working in windows, until i stumbled upon
this website
http://php.codeindepth.com/php-sending-mail/
It really boils down to changing few directives in php.ini and sendmail.ini
Changes required in sendmail.ini
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=your-gmail-id@gmail.com
auth_password=your-gmail-password
force_sender=your-gmail-id@gmail.com
Changes required in php.ini
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = your-gmail-id@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
;sendmail_path = "C:\xampp\mailtodisk\mailtodisk.exe"