Configure Localhost to Send Email in PHP using Gmail

Опубликовано: 01 Октябрь 2024
на канале: 876WilliamsTechJA
6,630
91

This is a demo on how to configure localhost to send Email in PHP using Gmail as the SMTP server.

Set the following values:

in the php.ini file
[mail function]
SMTP = smtp.gmail.com
smtp_port = 587
sendmail_from = [email protected]
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

In the sendmail.ini file
[sendmail]
smtp_server = smtp.gmail.com
smtp_port = 587
auth_username = [email protected]
auth_password = your Gmail app password