Quantcast
Channel: How to send mail from the command line? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 18

Answer by Marco Ceppi for How to send mail from the command line?

$
0
0

Most of the time you shouldn't need to configure an SMTP server you can simply use mail from the commandline (if it's not already present, install with sudo apt-get install mailutils). (Or if you're on a server where sendmail is configured, etc)

marco@dagobah:~$ mail -v marco.ceppi.use@gmail.com
Subject: Hello World!
This is an email to myself.

Hope all is well.
.
Cc: 

You terminate messages with a single . on line. That's when mail will prompt you for Cc: enter the information (or leave blank) and mail will then print out additional information on what it is attempting to do, as well as detailing the processing of connecting, transmitting, and receiving data from the mail server.


Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>