PHP-Sent Email for Gmail
2 min readSep 19, 2019
- Less Secure app access เป็น ON
2. Enable IMAP access
3. Setting SMTP
##เคสล่าสุดทดสอบผ่าน Localhost ได้ และ บาง site ลูกค้าได้ แต่ Up ขั้น Cloud ไม่ได้
- * เลยไปเจอ เคสนี้ ใน https://serverfault.com/questions/635139/how-to-fix-send-mail-authorization-failed-534-5-7-14
ดังนี้ พอทำตามได้แล้ว
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