1855259 Members
5566 Online
104109 Solutions
New Discussion

mail consol commands?

 
SOLVED
Go to solution
sandro ginnari
Occasional Contributor

mail consol commands?

Hi,
Tryed to understand from the man page but it's realy out of my mind!
Witch is the command line for using the mail function?
thanks
sandro
8 REPLIES 8
Kofi ARTHIABAH
Honored Contributor

Re: mail consol commands?

try mailx -s "suject" recipients

nothing wrong with me that a few lines of code cannot fix!
sandro ginnari
Occasional Contributor

Re: mail consol commands?

I actualy need the syntax and the procedure for sending a mail from consol.
Thanks
Patrick Wessel
Honored Contributor

Re: mail consol commands?

Have you ever tried 'elm' or 'mail' command?

elm gives you an userinterface
There is no good troubleshooting with bad data
John Palmer
Honored Contributor

Re: mail consol commands?

If you mean sending/reading mail then the standard commands are mail, mailx or elm.

mail and mailx are pretty much command line utilities with mailx being an extended version of mail.

elm provides a screen based interface.

Regards,

John
Berlene Herren
Honored Contributor
Solution

Re: mail consol commands?

I use this when using sendmail.

sendmail -v user@hostname.com
text
control D

If you are sending a file (example using /etc/hosts)

uuencode /etc/hosts hosts.txt | sendmail -v user@hostname



Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
Anthony Goonetilleke
Esteemed Contributor

Re: mail consol commands?

I think a bit of clarity is on order..
If you want to use an interactive mail program to send email from a console then you could use the following two as they are probably the best.
- elm
- pine

If you want to pipe the output of something or use it in a script you could use
- mailx
- sendmail
- mail


Minimum effort maximum output!
Morgan Pike
Occasional Contributor

Re: mail consol commands?

If you want to maybe send a file, use this example.
mailx -m -s 'This is my test' address@.com < /home/test/test123
This will send the file test123 to the mail address "address@.com".
Madanagopalan S
Frequent Advisor

Re: mail consol commands?

if you are looking for a command syntax to send messages thru
mail use
echo $MESSAGE | mailx -s "subject" user_name@address
let Start to create peaceful and happy world