Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was trying to send mail from bash, but it doesn't work and I can't find the reason... So my .msmtprc file is

account default
host smtp.gmail.com
port 587
from account@gmail.com
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user account@gmail.com
password password
logfile ~/.msmtp

(instead of account and password, of course, I have my data written) Then I use command

msmtp -t < test.txt

and no mail is sent (test.txt contains To:, From:, Subject: and text)! I've been struggling with this for some time, and it's really annoying... Any help would be appreciated.

Thanks in advance!

share|improve this question
What does the log file say? –  Robie Basak Feb 7 '13 at 11:05
Do you use 2 step authorization with gmail? –  desgua Mar 9 '14 at 1:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.