---

Tech Tip : Sending Email from Command line

[ Thanks to GeekRide
for this link. ]

“Everyone is not as lucky as having a full fletched
email client like thunderbird or kmail to send mails. There is one
unlucky group known as system administrators who have to send the
mails either through the command line or a script running on the
remote server. Also, apart from sending the emails, sometimes one
needs to test or debug the email server which can’t be done by
traditional email clients. If you are one of those system
administrators and are scared, then you shouldn’t be, because this
is where netcat comes to rescue.

“Netcat( /usr/bin/nc ) is a simple utility which is used with
TCP/UDP connections, sometime to troubleshoot and sometime as a
bridge to interact with them. In our case, if we would like to send
a email through port 25, we should be able to feed the stream of
data containing the mail information to port 25, and that is what
netcat is for.”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis