Tuesday, August 1, 2017

Install SendEmail (Simple SMTP client for Linux) on Linux Ubuntu, Centos & Redhat

SendEmail:-
SendEmail is simple email utility to send mail from a Linux system, SendEmail gives us the facility to include remote SMTP server in the command line.

SendEmail is most easy and commonly used email utility.

Requirement: -
1- Any Linux system i.e. Ubuntu, Centos or Linux
2- user with sudoers privileges
.


 Step 1: - Install SendEmail
In order to start the installation of SendEmail utility. First, we need to download required package: http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
1A- Download SendEmail utility from the following URL:  SendEmail
wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
2A- Extract file
tar -xvf sendEmail-v1.56.tar.gz
3A-  Copy SendEmail script to /usr/local/bin folder so you can execute it as a command.
cp -a sendEmail-v1.56/sendEmail /usr/local/bin
4A- Make SendEmail Script executable 
chmod +x /usr/local/bin/sendEmail
SendEmail installation has done. you can start using it.

Step 2: - Send an email using SendEmail utility:
sendEmail -v -f $username -s $host -xu $username -xp $password -t $recipient -o tls=yes -u $subject -m $content
Where:
Switch                   Use                                             Example
-f From Email address-               "Amar Singh<user@domain.com>"
-t Recipient address- user@domain.com
-s SMTP hostname or IP:port        (Example: 10.0.1.21:25 or smtp.office365.com:587)
-u Add subject- "This is Subject of Email"
-m message body- "This is body of Message"
-o TLS or SSL tls=yes 
-xu username user@domain.com
-xp password 123456

SendEmail Utility installation has been done, Now you can start using it.

No comments:

Post a Comment