zfwxvw
Last Updated: February 21, 2017
·
35.03K
· danjesus

Send Mail From Localhost with XAMPP

In php.ini [mail function] change to:

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my-gmail-id@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

In sendmail.ini replace to this:

[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

1 Response
Add your response

28632

You forgot to say that a reboot of xampp is required in order to apply changes. You must also activate less secure applications in Gmail. Even if I do all of this I can't get this to work...

over 1 year ago ·