sendEmail

This is the command tools for send email in console

wget http://linux.alanstudio.hk/sendEmail-v1.56.tar.gz
tar -zxvf sendEmail-v1.56.tar.gz
cp -p sendEmail-v1.56/sendEmail /usr/local/bin/
chmod +x /usr/local/bin/sendEmail

Install the tools first.

## check the parameter options
sendEmail

## Eg : (default : localhost:25)
sendEmail -f postmaster@sender.com -t alan@recipient.com -xu username -xp password -u subject -m message

## Eg : (send with using other smtp server)
sendEmail -f postmaster@sender.com -t alan@recipient.com -s mail.abc.com:25 -xu username -xp password -u subject -m message

## Eg : (Make script to send with attachment)
vi send-email-report.sh

#!/bin/bash
tail -n30 /var/log/messages.log > /var/log/rsync_messages_line30.log
sendEmail -f postmaster@sender.com -t alan@recipient.com -xu username -xp password -u subject -m message -a /var/log/messages_line30.log
rm -f /var/log/rsync_messages_line30.log



Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.