To: [email protected]
From: [email protected]
Subject: Sent from a terminal!
Your content goes here. Lorem ipsum dolor sit amet, consectetur adipisicing.
(Notice the blank space between the subject and the body.)
Press Ctrl + D to send.
You can also put the text in file and send it as follows:
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 [email protected]
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.
If you don't want to specify your password in the command line (generally not a good thing to do), you can omit that parameter and sendemail will prompt you for the password... and display it on the screen, but at least it won't be in your command line history.
Try to install The Mutt E-mail Client. Other option is using emacs with gnus. Others options available too... IMHO, you should use more details in your questions, or several different answers to your question you will receive :-)
hanoo@hp_laptop% nc 127.0.0.1 25
220 hp_laptop.localdomain ESMTP Postfix
EHLO man
250 hp_laptop.localdomain
MAIL FROM: <[email protected]>
250 2.1.0 Ok
RCPT TO: <[email protected]>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
This is the body of my mail,
this is the second line...
.
250 2.0.0 Ok: queued as 9C12E7F404
If you try to send e-mail from a system, whitch does not run an own e-mail-server (i. e. desktop system), you need to install something like nullmailer or esmtp, which forward your local mail to a "real" mail server.
As command line tools you can install mail or mailx (packages mailutils, heirloom-mailx or bsd-mailx). If you need attachments try biabam.
Install ssmtp :
Edit the ssmtp config file:
Append the following text:
Run ssmtp and provide the recipient email address:
Provide the message details as follows:
Press Ctrl + D to send.
You can also put the text in file and send it as follows:
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 withsudo apt-get install mailutils
). (Or if you're on a server where sendmail is configured, etc)You terminate messages with a single
.
on line. That's whenmail
will prompt you forCc:
enter the information (or leave blank) andmail
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.usage:
If you don't want to specify your password in the command line (generally not a good thing to do), you can omit that parameter and sendemail will prompt you for the password... and display it on the screen, but at least it won't be in your command line history.
Try to install The Mutt E-mail Client. Other option is using emacs with gnus. Others options available too... IMHO, you should use more details in your questions, or several different answers to your question you will receive :-)
You need an MTA to send mail. For this, use postfix:
To send email:
HELP
mpack is excellent commandline way of sending file attachments.
usage:
Install the package
sendmail
then typethen write your email then press Ctrl+D
or
You can send an email from the command line with TelNet or NetCat.
Everything is explained here.
If you try to send e-mail from a system, whitch does not run an own e-mail-server (i. e. desktop system), you need to install something like nullmailer or esmtp, which forward your local mail to a "real" mail server.
As command line tools you can install mail or mailx (packages mailutils, heirloom-mailx or bsd-mailx). If you need attachments try biabam.