Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
port 587
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
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
Do you have sendmail installed? are you looking to receive messages as well? – j0h Mar 3 '15 at 14:07

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.