Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Notes / Shell script to send mail

Shell script to send mail

 

 #!/usr/local/bin/bash

 (
 echo "HELO mail.libre.lv";
 sleep 2;
 echo "MAIL FROM: <info@libre.lv>";
 sleep 2;
 echo "RCPT TO: <test@libre.lv>";
 sleep 2;
 echo "DATA";
 sleep 2;
 echo -e "Subject: <test mail>";
 echo -e "<tests content>."
 echo -e "\n\n.";
 sleep 3;
 echo "QUIT";
 ) | telnet mail.skynet.lv 25