I need to send emails from localhost from a XAMPP installation. I don't want to use Sendmail with a Gmail as many tutorials show.
There is any way to do work PHP mail() function on localhost?
I need to send emails from localhost from a XAMPP installation. I don't want to use Sendmail with a Gmail as many tutorials show.
There is any way to do work PHP mail() function on localhost?
if your configure like this C:\xampp\php\php.ini
and c:\xampp\sendmail\sendmail.ini
for gmail to send mail.
now in C:\xampp\php\php.ini
find out extension=php_openssl.dll
and remove the semicolon from the beginning of that line to make SSL working for gmail for localhost.
file find [mail function]
in php.ini
and change
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my-gmail-id@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
and open it C:\xampp\sendmail\sendmail.ini
. Replace all the existing code in sendmail.ini
with bellow code
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=my-gmail-id@gmail.com
auth_password=my-gmail-password
force_sender=my-gmail-id@gmail.com