天天看點

mutt發郵件

在 /etc/Muttrc 檔案添加以下内容:

set from="[email protected]"

set use_from=yes

set envelope_from="yes"

set realname="laughingliang"

一: /data/sql_to_mail/friday_activity_20160416.txt 檔案以内容的形式發送:

mutt -s "my_first_test"  [email protected] -c [email protected]  < /data/sql_to_mail/friday_activity_20160416.txt

二: /data/sql_to_mail/friday_activity_20160416.txt 檔案以附件的形式發送:

echo "my_first_tes" | mutt -s "my_first_test"  [email protected] -c [email protected]  -a  /data/sql_to_mail/friday_activity_20160416.txt 

參數說明:

-a 附件。

-c 抄送

-s 主題

需要打開服務 postfix

mutt發郵件