PHP-Sent Email for Gmail

Thanaroj chareonphuthiwat
2 min readSep 19, 2019

--

  1. Less Secure app access เป็น ON

2. Enable IMAP access

3. Setting SMTP

##เคสล่าสุดทดสอบผ่าน Localhost ได้ และ บาง site ลูกค้าได้ แต่ Up ขั้น Cloud ไม่ได้

ดังนี้ พอทำตามได้แล้ว

This worked for me.

1) Login to your gmail account.

2) Go to https://www.google.com/settings/security/lesssecureapps and Turn On this feature.

3) Go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue.

Then you can authenticate your Additional Email Address from your Gmail Account.

Edit: In my case it helped to write smtp.gmail.com instead of smtp.gmail.com:587.

##Debug Mail

--

--

No responses yet