Home » Linux » ส่งอีเมลด้วย Command บน Ubuntu ผ่าน smtp.gmail.com

ส่งอีเมลด้วย Command บน Ubuntu ผ่าน smtp.gmail.com

อ้างอิงจาก http://www.binarytides.com/linux-mail-with-smtp/

ติดตั้ง swaks ด้วยคำสั่ง

sudo apt-get install swaks

จากนั้นทดสอบด้วยการส่งอีเมลผ่านคำสั่ง

echo “This is the message body” | swaks –to someone@gmail.com –from “you@example.com” –server smtp.gmmail.com –auth LOGIN –auth-user “you@gmail.com” –auth-password “abc123” -tls

โดยจะต้องทำการอนุญาตให้ล็อกอินผ่านแอปที่มีความปลอดภัยน้อยด้วย

ใส่ความเห็น

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น ช่องข้อมูลจำเป็นถูกทำเครื่องหมาย *

*
*