- Create a directory named "phpMailerLib" in the main directory.
- Open terminal and run "composer require phpmailer/phpmailer". For more info, goto https://github.com/PHPMailer/PHPMailer
- The directory structure should look like this. ├── sendEmail.php ├── phpMailerLib │ └── vendor │ ├── autoload.php │ ├── composer │ └── phpmailer └── README.md
- Now create app password (not your account password) in your google account. (Help: https://support.google.com/mail/answer/185833?hl=en#:~:text=Create%20%26%20use%20App%20Passwords)
- Set your email id as "Username"
- Set newly generated app password as "Password"
- Set Recipients, CC, BCC etc.
- Change the email body.
- run "php sendEmail.php" . Or, write a function as per your need.
-
Notifications
You must be signed in to change notification settings - Fork 0
shirshak007/core-PHP-Email-Sending
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Sending email using core php with the help of PHPMailer library & Gmail SMTP
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published