How can I send an email from the command line?

Jhair Tocancipa Triana jhair.tocancipa at gmail.com
Sat Aug 12 08:06:10 UTC 2006


Konstantinos Togias writes:

> On 8/12/06, ad5qa <ulist at gs1.ubuntuforums.org> wrote:
>> 
>> I tried mail and man mail and I get: bash: mail: command not found. I
>> will also like to hit the command line and send a quick mail.
> To install the console mail utility you have to install the
> mailutils package:

> apt-get install mailutils

Instead of mail, you can also use nail[1] which is somewhat more
powerful.

With nail, you can easily add attachments to your mails from the
command line, for example:

$ echo "Test" | nail -a slides.pdf -s "Slides" jhair.tocancipa at gmail.com

sends the slides.pdf file to my email account.

nail also can send emails without the help of an additional MTA, among
many other cool things.

HTH,

______________ 
[1] pool/universe/n/nail/nail_11.25-1_amd64.deb

-- 
--Jhair





More information about the ubuntu-users mailing list