Send a mail over a linux shell

Installation:

$> sudo apt-get install sendmail
$> sudo apt-get install mailutils
$> sudo apt-get install postfix

Send messages using the mail-command

To check If  postfix is installed and ready to work on your system, you can try:

$> mail info@ask-sheldon.com
Subject: TEST
TESTETST
EOT (Shortcut: ctrl + shift + d)

Reconfiguration of postfix on Debian / Ubuntu:

$> sudo dpkg-reconfigure postfix

Alternative sendmail

$> /usr/sbin/sendmail -t << EOF
> To: marcel.lange@snsconsulting.de
> Subject: Test
> Blaasdn asndnasdaoisj aksmndcik
> EOF

 

Leave a Reply

Your email address will not be published.

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.