PDA

View Full Version : email from terminal


kkpal
2008-06-03, 02:38 AM CDT
hi all

How do I send email from terminal (using mail). And what are the settings I have to do?
I am using FC7.

Thanks & Regards
KKPal

scottro
2008-06-03, 06:37 AM CDT
Your sendmail (or whatever you use as the system's MTA (Mail Transfer Agent) has to be setup correctly.
I've done it with postfix and the older, unmaintained, ssmtp. There's a few threads on the forums about it--do an advanced search, with my user name, ssmtp and postfix and you'll probably come across one of them. Look for the posts by stevea who describes how it should be done.

cicatrix1
2008-06-05, 10:12 AM CDT
man mail will give you all the options. Typically I just use mail -s <subject> whoever@blah.com

You can either pipe output to it (if from a script or something), or just type your message after the command, and hit control+D when you're done.