0

I want to set up mailutils on my terminal problem is that I don't want to create another email account. My question is, is it possible to use my gmail from my terminal ?

Sebastian
  • 21
  • 1
  • 2
  • What is the problem? You can setup mailutils or whatever mail program to use gmail server. – Pilot6 May 28 '15 at 18:35
  • You need to setup postfix first. Is that the question? – Pilot6 May 28 '15 at 18:40
  • For sending email, [this](http://linuxconfig.org/configuring-gmail-as-sendmail-email-relay) (or [this](https://rtcamp.com/tutorials/linux/ubuntu-postfix-gmail-smtp/)) may help – Wilf May 28 '15 at 18:40

1 Answers1

0

The easiest way to send mail from terminal is to use sendemail program. Install it

sudo apt-get install sendemail

Bow you can send it by this command

sendemail -f <from_address> -t <to_address> -u "<subject>" -m "<message>" -s smtp.gmail.com:587 -o tls=yes -xu <your_gmail_address>

It will ask for password, which unfortunately will be displayed on screen.

To make it shorter to enter, you can make an alias in bashrc.

There are also very many ways to do it. I use git send-email.

You can setup mailutils to the same server.

Pilot6
  • 88,764
  • 91
  • 205
  • 313