Sending e-mail from bash

To send an email message with mail, give the email addresses to which you are sending as arguments, and then type the message proper in the lines that follow; type C−d on a line by itself to signify the end of the message body, and to send the message.

To send an email message to lisa@example.com, type:

$ mail lisa@example.com RET
Subject: Hello RET
Hi there, long time no talk! I'm just learning how to use RET
Linux and thought I'd show you how easy it is to send email! RET
C−d
Cc: RET


The text you type on the `Subject:' line is displayed as the subject of your email message, and the lines of text you type after that is the body text of the message. Type C−d on a line alone to end the message. Then, mail prompts for `Cc:' addresses; a "carbon copy" of the email message is sent to any addresses you give here, if any (just type RET for none, and separate multiple addresses with commas). When you type, mail just reads the standard input like any other command−line tool, so there's little direct editing capability in this basic email service−−use C−u to erase the current line, and C−c C−c (that is, C−c pressed twice) to cancel your input and abort the message altogether.That's it! No bells, no whistles−−but no time−wasting excess, either.

Posted on: 17/12/2009








0 Comments
If you want to leave a comment please Login or Register
How to backup your data using rsync......
Understanding autoconf......
The Basics of fdisk......
Accessing Memory Using DMA......
The fd Directory......