Thursday, June 19, 2008

e-mail @ console

There are times I want to send a file, write a couple of lines to someone or simply send a reminder to my own mailbox by e-mail directly from terminal. This is where the plain old mail tool comes to the scene. It's manual page and all kinds of tutorials on how to use it is available on the web. However it took a little time to configure it to send mail via the corporate SMPT server. Finally, I could find something on the web and after modifying it a little bit it works. Install the gnu mailutils package, put the lines below to the ~/.mailrc and voilĂ .

set sendmail="/usr/lib/mailutils/mail.remote \
--mailer smtp://mail.server.address \
-f you@your.mail.address"

No comments:

Label Cloud