การตั้งค่า SMTP Server Gmail และ Mail server
การตั้งค่า SMTP Server Gmail และ Mail server
สำหรับลูกค้าที่ใช้ phpmail ส่ง หรือ ใช้ smtp ของ server ส่งแล้วมีปัญหา
แนะนำให้ลูกค้าใช้ smtp ของ gmail หรือ g-suite เนื่องจากมี header mail ที่มีความน่าเชื่อถือกว่า ทำให้อีเมลล์ที่ส่งไปยังปลายทางไม่ตก Junk mail ด้วย
หากยังไม่มีสคริปส่งเมลล์ สามารถโหลดได้ที่ https://hostsevenplus.com/dl/smtp.zip (สามารถประยุกต์ใช้งานกับระบบอื่นๆได้)
Mailer: Gmail SMTP Server (ฟรี ส่งได้ 500ฉบับ/วัน)
Mail From: <your_user_id>@gmail.com
SMTP Auth: Yes
SMTP Security: tls
SMTP Port: 587
SMTP User: <your_user_id>@gmail.com
SMTP Password: <your_password>
SMTP Host: smtp.gmail.com
-----------------------------------------------
Mailer: G-suite SMTP Server ( 3USD/เดือน ส่งได้ 2000ฉบับ/วัน)
Mail From: <your_user_id>@yourdomain.com
SMTP Auth: Yes
SMTP Security: tls
SMTP Port: 587
SMTP User: <your_user_id>@yourdomain.com
SMTP Password: <your_password>
SMTP Host: smtp.gmail.com
ข้อมูลเพิ่มเติม>> https://support.google.com/a/answer/176600?hl=th
หากยังติดปัญหาการเชื่อมต่อ smtp ทำตามวิธีด้านล่าง
1. เปิดการยืนยันแบบ 2 ขั้นตอน (เปิด 2 Factor Authentication)
https://support.google.com/accounts/answer/1064203?hl=th
2. Gen App Password เพื่อเอาไปใส่ในตั้งค่า SMTP
https://select2web.com/creating-google-app-password/
https://support.google.com/accounts/answer/185833หมายเหตุ
สำหรับ 30 พฤษภาคม 2565 เป็นต้นไปทาง google ได้ปิดระบบ Config Less Secure App ( อนุญาตให้แอปที่มีความปลอดภัยน้อยเข้าถึงบัญชีของคุณ)
ดูรายละเอียดที่ https://support.google.com/accounts/answer/6010255?hl=en&utm_source=google-account&utm_medium=profile-less-secure-apps-card
แนวทางการแก้ไข
เข้าไป เปิด 2 Factor Authentication ก่อน แล้วGen App Password ต่อเอาไปใส่ในตั้งค่า SMTP ครับ
https://select2web.com/creating-google-app-password/https://support.google.com/accounts/answer/185833
-------------------------------------------------------------------------
สำหรับกรณีที่ลูกค้าใช้งาน smtp ของ server (ไม่แนะนำ เนื่องจากมีการลิมิต และ อีเมลล์มีโอกาศลง Junk mail )
Mailer: Mail server SMTP (ฟรี ส่งได้ 50 ฉบับ/วัน)
Mail From: <your_user_id>@yourdomain.com
SMTP Security: none หรือ tls
SMTP Port: 587 หรือ 25
SMTP User: <your_user_id>@yourdomain.com
SMTP Password: <your_password>
SMTP Host: mail.yourdomain.com
ขอบคุณสคริป smtp จาก
http://www.thaicreate.com/php/php-send-email-smtp-gmail-account.html
Was this answer helpful?
Also Read
Powered by WHMCompleteSolution