Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music
All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => Mail issue , problem , configuration => Topic started by: golfreeze on มกราคม 23, 2011, 01:07:06 AM
-
ปกติใช้ sendmail ก็ครอบคลุมหมดครับ แต่มา mutt แล้วก็เจ๋งดี สามารถ ส่งเป็น mutiple file ได้ครับ คือ
attach file หลายๆไฟล์
#echo "Subject: Welcome Message To NTT Members" | cat - /home/golf/sms_send.txt |
sendmail -F "support- mail@ntt.co.th"; -f support- mail@ntt.co.th $account <
$USERLIST/sms_send.txt
#pkg_add -r mutt
#mutt -s "Welcome Message To NTT Members" -a sms_send1.txt -a test.txt
unixwg@ntt.co.th < $USERLIST/sms_send.txt
-s คือ subject
-a คือ attachfile
< sms_send.txt คือ ข้อความที่จะให้แสดงใน message mail
unixwg@ntt.co.th คือ email ปลายทางที่จะส่งไป
ถ้าต้องการแก้ from ให้มาจากใครก็ set ที่
#vi /usr/local/etc/Muttrc
set from=" username@yourmail.com";
ถ้าต้องการ options เพิ่มก็ man mutt เลยครับ
-
ถ้าเป็น command ง่ายก็นี่เลยครับผม
#mutt -a xxx.php -s "check send at 1706" golfreeze[at]packetlove[dot]com
โดยที่
1. xxx.php เป็นไฟล์ที่ attach ไปในเมลครับ
2. ส่วน "check send at 1706" คือ subject
3. golfreeze[at]packetlove[dot]com = email ปลายทางที่ต้องการส่งไปครับ
;)
-
อีก command ที่ผมชอบใช้ส่งเมล และ แนบรายละเอียดในไฟล์ มาแสดง เป็นเนื้อเมล คือ
#mailx account@example.com < attach_file_name
หรือ
#mail account@example.com < attach_file_name
ก็แล้วแต่ชอบครับ
-
ใช้ mutt ส่งระบุ sender account "From: golftest@noc.ntt.co.th"
subject = -s "Hello kub"
to account = -c golftest@packet
message = < message
attach file = -a "PAYMENTCOPY.zip"
#mutt "From: golftest@packetlove" -s "Hello kub" -a "PAYMENTCOPY.zip" -c golftest@packet < message