1
I'm trying to learn the Linux command mail
and so I tried sending a simple message to myself via the following sequence of commands from the terminal:
> mail -s "Hello World" email@gmail.com
> <Enter>
> Cc:
> <Enter>
> Test message
> <Enter>
> <Ctrl+d>
The terminal then returns to the prompt I started with. I am not receiving the email in my gmail account, though (it's not in spam, either). I'm using Ubuntu. Any thoughts on troubleshooting?
Update: I followed the configuration given here, but then when I entered the above commands I got an email from Google stating they blocked a sign in attempt "from an app that doesn't meet modern security standards."
Update 2: I went through the tutorial given below (link) but am still unable to send mail. However, I now get the command line message
~$ send-mail: authentication failed (method PLAIN)
send-mail: server message: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbv2h
send-mail: server message: 534-5.7.14 uISOTfHhetkRKAzV55Xrqy1sBK3ti2FcFdj5T33g6aZcZ2Ue1xaqVs8BFtm5Plrq7vrcJm
send-mail: server message: 534-5.7.14 YNad84IiP4p-Tc61duh6UjDAoRnvv9NnYE1krHK-xzCRQtg_i1xSqZBRjkhLzwell5fTGG
send-mail: server message: 534-5.7.14 hGZAHZ2kS8Wj5ZakAcoao9R-wJ3aBFeC7-vzewWwy95CKKAck6DzB1xXqa62H38xxCHr7W
send-mail: server message: 534-5.7.14 31sJWYOMgBOB6_w_Y52FQOo82wuc> Please log in via your web browser and
send-mail: server message: 534-5.7.14 then try again.
send-mail: server message: 534-5.7.14 Learn more at
send-mail: server message: 534 5.7.14 https://support.google.com/mail/answer/78754 f7sm45326174qhf.7 - gsmtp
send-mail: could not send mail (account default from /home/<username>/.msmtprc)
I was already logged in to my gmail on my browser. Of course I visited the link https://support.google.com/mail/answer/14257?rd=1 in the error message, but still nothing.
Did you configure mailutils ? – pun – 2016-01-07T02:01:24.367
@The_IT_Guy_You_Don't_Like Okay, I just went through these steps: http://rianjs.net/2013/08/send-email-from-linux-server-using-gmail-and-ubuntu-two-factor-authentication. I then re entered the above commands and got an email from Google saying they blocked a sign in attempt as soon as I sent it. Any thoughts on getting around this?
– bcf – 2016-01-07T02:19:17.787I am quire sure its being blocked for the same reasons as mentioned by @trinsic. Why don't you setup some other email address to test – pun – 2016-01-07T08:36:46.600