LINUX CLASSES - EMAIL
How Do I Send Email With Linux?
The most basic way to send email on a Linux system is with the mail
command. The mail program is a command-line interface for sending and receiving electronic mail. It works, but it's not pretty. Later in this section, you'll learn about Pine, a much friendlier email interface, but you should know how to use mail
since it's guaranteed to be available on any Unix
system. Let's say you're logged in as root
and you want to send a message to hermie. Start the process by typing
The system will respond with a Subject: prompt. Type the subject for your note, press enter, and then write your message, line by line. When you're done with your missive, press enter to get to a blank line, then ctrl-D to send it.
Here's a sample mail session. (The stuff you type is shown in bold, and the system prompts are normal intensity.)
# mail hermie
Subject: Gone Fishing
I've decided to kick back this afternoon and go fishing.
So if this crazy Linux system rolls over and
I suggest you do likewise.
After you press ctrl-D, the system responds with the cryptic EOT message, which could mean "End of Text," or "Eat Only Twinkies," or whatever you like.
You may notice an apparent contradiction in the preceding example, since the email address of the recipient does not contain an @ sign and a domain name. If the sender and recipient are on the same system, it's all right to give just the user name as the email address. You could just as well have addressed your mail to firstname.lastname@example.org since in this case, this is equivalent to
Previous Lesson: Perl Pattern Matching
Next Lesson: Reading Email
[ RETURN TO INDEX ]
Comments - most recent first
(Please feel free to answer questions posted by others!)
(20 Oct 2013, 21:19
Ëàìèíèí.Ôàêòû-óïðŸìàŸ âåùü. Âû ìîæåòå íå âåðèòü,
íî ýòî ïðàâäà. Ïðàêòè÷åñêè ÂÑÅ áîëåçíè,äàæå íåèçëå÷èìûå,óõîäŸò áëàãîäàðŸ Ëàìèíèíó.
Ýòèì íå øóòŸò. Ñåáå äîðîæå.
Ðàñïðîñòðàíåíèå ïî ÌËÌ. Äåíåã çäåñü ìíîãî.
Ðåàëüíî, íî â äàííîì ñëó÷àå âòîðè÷íî.
Ïðîñòî óäåëèòå 2 ìèíóòû.
Ïîñòàâêà Ëàìèíèíà â ñòðàíû ÑÍÃ.
Äèåòè÷åñêàŸ Äîáàâêà. Ñåðòèôèöèðîâàíî â Óêðàèíå.
Öåíà 300 ãðèâåí è íèæå â ÌËÌ.
(31 Jul 2013, 02:04
Hello My Dear Friends, Users Forum !
The Company In-Disguise . Com
Anonymous Internet Surfing, Anonymous Downloading-Uploading Torrent-P2P, Amonymous WiFI.
In-Disguise . Com - Fully Automatic and Anonymous VPN Service , you don’t have to waste time on:
1 - Search Supports if disconnected from a server, search for a standard installation “OpenVPN client”
time for installing downloaded configs to the program.
Subscribe to All Servers of Our Service for 9 Euro; 3 months = 20 Euro; 6 months = 35 Euro; 1 year = 55 Euro.
2 - Unique “VPN Client” is easy to install on all kinds of Operating Systems: MAC /
Windows / Linux!!!
Will allow you to switch easily between the VPN servers in USA / DE / UK / IT / NL / LU / EG / PA / RO / MY Continuing
Types of VPN connections included in a single subscription - DoubleVPN and OpenVPN.
3 - Company Takes All Kinds Of Payments in Full Auto Mode!
WebMoney / Visa / Master Card / PayPal / Liberty Reserve / BitCoin / SMS and many others.
Our VPN Service Is Here!
in-disguise . com
Sincerely, Your Anonymous VPN Service : In-Disguise . Com
(02 Jun 2013, 15:19
My consultant was so
euphonious, polite, and ensured that I got
precisely what I wanted. She couldn't have been more
benevolent during a laborious time.
My advisor was so
enjoyable, polite, and ensured that I got
in all respects what I wanted. She couldn't experience been more
sympathetic during a problematical time.
(27 May 2013, 18:24
A manor house is a grand habitation, especially a peer royalty habitation or the residency of a administrator of governmental or some other high-ranking dignitary, such as a bishop or archbishop.<>] The intelligence itself is derived from the Latin name Palatium, proper for Palatine Hill, one of the seven hills in Rome
A palace is a luxurious abode, predominantly a royal stay or the make clear of a headmaster of state or some other high-ranking superstar, such as a bishop or archbishop.<>] The in short itself is derived from the Latin name Palatium, for Palatine Hill, solitary of the seven hills in Rome
A castle is a respected abode, predominantly a royal stay or the home of a head of voice or some other high-ranking dignitary, such as a bishop or archbishop.<>] The in short itself is derived from the Latin rank Palatium, proper for Palatine Hill, solitary of the seven hills in Rome
A palatial home is a grand castle, noticeably a viscountess residence or the diggings of a administrator of state or some other high-ranking lady muck, such as a bishop or archbishop.<>] The intelligence itself is derived from the Latin big cheese Palatium, fit Palatine Hill, a woman of the seven hills in Rome
A manor house is a luxurious residence, predominantly a peer royalty chƒteau or the diggings of a administrator of state or some other high-ranking superstar, such as a bishop or archbishop.<>] The in short itself is derived from the Latin superstar Palatium, fit Palatine Hill, a woman of the
seven hills in Rome
A manor house is a luxurious habitation, noticeably a viscountess chƒteau or the diggings of a headmaster of state or some other high-ranking superstar, such as a bishop or archbishop.<>] The intelligence itself is derived from the Latin superstar Palatium, looking for
Palatine Hill, bromide of the seven hills in Rome
(11 Mar 2013, 10:05
Âîçíèêëà ïðîáëåìà,íå ìîãó ïèñàòü ïîñòû íà ôîðóìå, ÷àñòî âûäàåò
îøèáêó FlashScript 458 Error
×òî ýòî ìîæåò áûòü ?
(01 Mar 2013, 01:22
Ïðîäàþ ðåãàííûå àêêàóíòû: Ðåäèðåêòû Dot.tk , Gmail.com AE PVA , Zero Catch , Yahoo.com , Liveinternet.ru , Pinterest.com , Vkontakte.ru SMS Plus , Bitly.com API è ìíîãîå äðóãîå â íàëè÷èè è íà çàêàç.
- î÷åíü áîëüøîé àññîðòèìåíò + ðàçëè÷íûå àêêàóíòû àêòèâèðîâàííûå ïî ñìñ
Ïî âñåì âîïðîñàì ïèøèòå ñðàçó â àñüêó ICQ 231538
àêóàíòû yahoo , êóïèòü àêê ææ , ïðîäàæà àêêàóíòîâ youtube , ïðîäàæà àêêàóíòîâ mail.ru , mamba ðàñïðàäàæà , èíòåðíåò ìàãàçèí àêêàóíòîâ drjynfrnt , ïîêóïêà àêêàóíòà íà ìàìáå , êóïèòü àêêàóíòû âêîíòàêòå ,
ïðîäàæà àêêàóíòû âêîíòàêòå , ïðîäàæà àêêàóíòîâ facebook , ïðîäàæà àêêàóíòîâ âêîíòàêòå , àêêàóíò xml , ìàãàçèí àêêàóíòîâ ëàâïëàíåò , áàçà àêêîâ ìàéë ðó , ïðîäàì àêêàóíòû îäíîêëàññíèêè , êóïèòü àêêàóíòû gmail , ãäå êóïèòü àêêàóíòû gmail , êóïèòü àêêàóíò òâèòòåð ñ ôîëëîâåðàìè , ïðîäàì äíåâíèê site:liveinternet.ru , yahoo.co.ru , ïðîäàæà àêêàóíòîâ facebook , êóïèòü àêêàóíò linkedin , êóïèòü àêêàóíòû
âêîíòàêòå , êóïèòü gmail àêêàóíòû , ïðèõîäŸò ëè ñìñ îò loveplanet , êóïèòü àêêè ñîö ñåòåé , ìàãàçèí îíëàéí ïðîäàæè àêêàóíòîâ mamba , liveinternet.ru/users/akkayntu/ , ïðîäàæà àêêàóíòîâ yahoo , ïðîäàì àêêè âê , ïðîäàæà àêêàóíòîâ âêîíòàêòå , îäíîêëàññíèêè àêêè , êóïèòü àêêàóíòû âêîíòàêòå , àêêàóíòû îäíîêëàññíèêîâ , ïðîäàì àêêàóíò îäíîêëàññíèêè , ìàãàçèí àêêàóíòîâ âêîíòàêòå , êóïèòü àêêàóíò email ,
ïðîäàæà àêêàóíòîâ: yahoo gmail , ïðîäàæà àêêàóíòîâ vkontakte , êóïèòü êðàñèâûå àêêàóíò Ÿíäåêñ , îíëàéí ìàãàçèí àêêàóíòîâ âêîíòàêòå , êóïèòü àêêàóíòû âêîíòàêòå îíëàéí , îíëàéí ñåðâèñ àêêàóíòîâ âêîíòàêòå , êóèïòü àêêè mail.ru , êóïèòü àêêàóíòû facebook.com , öåíû íà àêêàóíòû îäíîêëàññíèêîâ , www.yandex.ru äíåâíèê , ïðîäàæà àêêàóíòîâ odnoklassniki , user.prodaja gmail.com , ïðîäàì àêêè ìàìáà ,
ïîêóïêà àêêàóíòîâ â êîíòàêòå , ïðîäàæà àêêîâ livejournal , êóïèòü àêêàóíòû âêîíòàêòå îíëàéí , ïðîäàì ðàñêðó÷åííûå àêêè âêîíòàêòå , îíëàéí ìàãàçèí àêêàóíòîâ , êóïèòü àêêàóíòû mail.ru , vkontakte.ru codi , çíàêîìñòâà ìàéë ðó êàê óçíàòü ðåàëñòàòóñ , êóïëþ àêêàóíòû ìàìáà ñî ñòàòóñîì ðåàë , ãîðîä äðóçüŸ êîììåíòàðèè yahoo hotmail , ïðîäàåì àêêàóíòû îäíîêëàññíèêîâ , àêêàóíòû Ÿõó , ìàãàçèí àêêàóíòîâ ,
ïðîäàæà àêêîâ âê , real-ñòàòóñ ìàìáà â ôîðìàòå , êóïèòü àêêàóíòû Ÿíäåêñ , êóïëþ mail.com àêêè , ìàãàçèí àêêàóíòîâ , êóïèòü àêêàóíòû mail.ru àâòîðåã , ìàãàçèí àêêàóíòîâ youtube , îíëàéí ïðîäàæà àêêàóíòîâ âêîíòàêòå , êóïèòü facebook pva , 1 google ïðîäàæà , êóïèòü àêêàóíòû âêîíòàêòå îíëàéí , àêêàóíòû yahoo pop3 .
(16 Mar 2012, 06:56
Hi, I am trying to send a mail through mail command in linux but not able to. Here is the command I am giving.
mail -s "Sub:Test Mail" email@example.com
When I give this command, its geting struck and nothing is coming later. Mine is Red Hat Linux 5.3 (Tikanga). But I am able to send the
mails from the application server with my EmailService.
I even tried the mutt utility. Here is the below command I used.
mutt -a test.out -s "Sub-Test" firstname.lastname@example.org
Please do the needful.
(04 Mar 2012, 22:09
Hi This is ram. In my office we are using linux imap email server. Recently i created a new user email account. After that email working internally fine. But External email unable to receive and cannot sent. Previous user all emails working fine.. Recently created emails only problem... I need to know the wat is the problem.. Can anybody give suggesstion...
(05 Feb 2012, 17:11
I hope that this will teach me a little
(21 Jan 2012, 06:46
are you getting sender unknown in the log messages?
(22 Dec 2011, 13:17
Unable to receive mail after,
[root@localhost ~]#mail -s "test" email@example.com
somebody help me get out of this trouble...?
(07 Dec 2011, 08:18
mail -v email address
is more useful as a command as it shows whether the mail was sent or not before checking the log files.
(05 Nov 2011, 23:42
how the program is running automatically on the remote host and how can i get that results automatically to my system .......how can i write all these commands in one .sh script program?
(05 Nov 2011, 12:15
I use a Red Hat derivative
Try editing the file or its equivalent "/etc/xinetd.d/telnet"
# default: on
# description: The telnet server
serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
(19 Sep 2011, 00:39
here again, now i can run a telnet server and an ssh server. ssh works great, i can login, remote copy, and remote execution of programs. telnet works only if the telnet client is on the same computer as the telnet server...but when i try to connect from a remote computer which is the what we want a telnet to work...it said "Connection refused". can somebody try to help me on
(06 Sep 2011, 00:09
first, i want to thank you for setting up this linux tutorial, i learned a lot from this and it proves to be a great
reference. actually it was in this site where i started to study linux. using linux is quite addicting, that i
started to download lot of tutorials, and managed to learned more from them.
my issue is about running a telnet server. the distro that i'm using right now is ubuntu 10.10. it does not include
the package that
is required for running telnet daemon. installing additional package is not easy since my computerat
at home is not connected to the internet, "apt-get install [package]" is not possible. my option is to use dpkg
command to install package from a file. i already downloaded the package
"inetutils-telnetd*.deb" and all its
dependencies and manage to successfully install it. but i cant seem to run telnetd, even if i issue the command to
run it. "ps" command does not show that it is running although inetutils-inetd is running which is one of its
dependency. i've search all the tutorials i have but cant find the topic, although i havent search the HOWTO doc.
man pages doesnt help me neither. i dont know if i need to make a script to run the telnet daemon and put it in
the runlevel directory. my
linux default runlevel is 2, and i saw a script inside the rc2.d directory which runs
the inetutils-inetd automatically at startup.
i can seldom access the internet, so searching thoroughly the solution from the web is quite not
hope you'll have the time to give me a solution.
also, can i ask how to share a directory to the network using the command line. and how can i mount and access
it from another linux machine. i know
ftp is one solution, but i also cant run ftpd after installing it.
thanks in advance.
(29 Apr 2011, 07:45
Hi i want to make a shell script in which my daily log files directly send to my email address from my unix server.Please help me!!Thanks Nittin
(27 Apr 2011, 05:49
How can i send email with one by one email sending option, like (automailsender for windows),
Please suggest software name if any yet for linux.
(26 Apr 2011, 10:13
@pavelvolinkiinss - There is no malware on this site. You are seeing a false positive from your security software.
(26 Apr 2011, 03:18
Admin, hello! here are having problems with your site. malware warning Write me. icq 989567856647
(21 Apr 2011, 07:40
how can i create mail server using linux?
(22 Mar 2011, 23:34
I am running Oracle jobs on Linux, how can i trigger mail to a person, on the failure of job. Your response will help me a lot....Thank you.
(04 Feb 2011, 00:23
How to uninstall .exe files in linux ubuntu 9.04
(20 Jan 2011, 10:36
how to install ssh in linux.........
(20 Jan 2011, 10:25
How to send message threw terminal in linux
(28 Dec 2010, 19:07
This is very useful. please remove some of the extraneous details, it's full of fun facts@
(17 Nov 2010, 02:28
I want to send mail from my system to another system both in linux and same LAN. i have tried with mutt,mail,mailx but after everything i got the message that
No mail for XXXX
(10 Aug 2010, 12:26
Is it possible to send a message to a local systems,which are connected by LAN through a sambaserver in linux.............?
(09 Jul 2010, 05:58
you use this steps,
1) ssh IP Address
2)system ask you password. you write that system password and use command......init 6.
(24 Jun 2010, 07:16
My mail sending is always failed can anyone help me out for this..... plz
(04 Jun 2010, 07:55
@martinjester - thank you, now it is working!
(03 Jun 2010, 16:40
you need to do install mailutils on Ubuntu, then it will work correctly
sudo apt-get install mailutils
(03 Jun 2010, 15:30
I tried this in ubuntu 9.10 and it errors out stating that the mail program is not installed.
The program 'mail' can be found in the following
Ask your administrator to install one of them
mail: command not found
(02 Jun 2010, 00:12
Dr. I have tried the mail command on solaris but it has not worked.
Do you known the mail command that I can use on the above operating system?
Recently at my faculty, a group of programmer who had customized ubuntu into there own version visited us and showed us there
I would like known how they got to access the O/S's code and which tools did they use?
(01 May 2010, 15:32
How to restart Linux servers remotely
(09 Mar 2010, 10:05
I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But
don't ask me to send what you already have. :-)
NO SPAM! If you post garbage, it will be deleted, and you will be banned.
Copyright © by Bob Rankin
All rights reserved - Redistribution is allowed only with permission.
More To Explore