Skip to content

Sending email using core php with the help of PHPMailer library & Gmail SMTP

Notifications You must be signed in to change notification settings

shirshak007/core-PHP-Email-Sending

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

  1. Create a directory named "phpMailerLib" in the main directory.
  2. Open terminal and run "composer require phpmailer/phpmailer". For more info, goto https://github.com/PHPMailer/PHPMailer
  3. The directory structure should look like this. ├── sendEmail.php ├── phpMailerLib │   └── vendor │   ├── autoload.php │   ├── composer │   └── phpmailer └── README.md
  4. 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)
  5. Set your email id as "Username"
  6. Set newly generated app password as "Password"
  7. Set Recipients, CC, BCC etc.
  8. Change the email body.
  9. run "php sendEmail.php" . Or, write a function as per your need.

About

Sending email using core php with the help of PHPMailer library & Gmail SMTP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages