How to Send Emails from XAMPP localhost Using PHP Mail Function and Gmail SMTP with App Password

Опубликовано: 02 Ноябрь 2024
на канале: gilgeekify programming
383
13

In this tutorial, we will learn how to configure the XAMPP localhost to send emails using the Gmail SMTP server and an app password. In fact, we will adjust some settings so that the default mail function in PHP can fully utilize Gmail's SMTP for sending emails.

🎞️ TABLE OF CONTENTS 🎬
0:00 Introduction
0:30 Testing an email sending PHP script
1:26 Connect XAMPP localhost to Gmail SMTP
1:52 Edit php.ini file
2:38 Edit sendmail.ini file
3:06 Create an app password for a Google account
4:00 Restart XAMPP server
4:20 Send an email from localhost
5:09 Sending another email for testing
6:07 End Screen

💻 Configuration Commands
📂 https://gist.github.com/saeedkohansal...

⏯️ By watching this video, you will learn:
🔴 Configuring XAMPP for Gmail SMTP: This will guide you on how to set up XAMPP to use Gmail’s SMTP server for sending emails.
🟢 Enabling PHP mail function with Gmail SMTP: You’ll learn how to enable and configure the PHP mail function to work with Gmail’s SMTP server.
🔵 Sending emails in PHP program: This section will demonstrate how to write a PHP script to send emails using the configured SMTP server.
🟡 Using Gmail SMTP in localhost environment: You’ll learn how to use Gmail’s SMTP server to send emails from a localhost environment.
🟠 Authenticating Gmail with app password: This part will show you how to generate and use an app password for Gmail to authenticate your email sending requests.

#php #xampp #localhost #gmail #smtp #webdevelopment #gilgeekify