msmtp

msmtp を使ったメールの送信方法

msmtp -C setting_gmail.txt -t < in01.txt

in01.txt

	From: aaa@gmail.com
	To: bbb@example.com
	Subject: Test using msmtp from gmail on Jan/23/2017
	Test
	From Gmail
	Good Morning
	Bye
	
setting_gmail.txt

account default
host	smtp.gmail.com
port	587
user	aaa
password	*****
#
auth	on
tls	on
tls_certcheck	off
#
from	aaa@gmail.com
#
logfile	msmtp.log
#
yahoo.co.jp のセッティング

account default
host	smtp.mail.yahoo.co.jp
port	587
user	aaa@yahoo.co.jp
password	*****
#
auth	plain
tls_certcheck	off
#
from	aaa@yahoo.co.jp
#
logfile	msmtp.log
#
Hi-ho のセッティング

account default
host	hi-ho.mose-mail.jp
port	587
user	aaa@hi-ho.ne.jp
password	*****
#
auth	plain
tls	on
tls_certcheck	off
#
from	aaa@hi-ho.ne.jp
#
logfile	msmtp.log
#
Nifty のセッティング

account default
host           smtp.nifty.com
port           587
user           aaa@nifty.com
password       *****
#
auth           plain
tls_certcheck off
#
from           aaa@nifty.com
#
logfile ~/.msmtp.log
#
Plala のセッティング

account default
host	sky.mail.plala.or.jp
port	587
user	aaa@sky.plala.or.jp
password	*****
#
auth	plain
tls_certcheck off
#
from	aaa@sky.plala.or.jp
#
logfile	msmtp.log
#
Return

Jan/23/2017 AM 08:15