sorry i was at work so i didnt have it
Here is how to make mutt send email using ur gmail account
1) Logon to ur gmail account , in settings -> Forwarding and POP
enable pop for all mail
2) Download nbSMTP (nbSMTP is a simple SMTP)
NOTE : u have to have openssl , libssl-dev installed
http://nbsmtp.ferdyx.org/
3) setup mutt by making a file named .muttrc in my HOME
here is mine :
set folder=~/Mail
folder-hook . "my_hdr From: <username@gmail.com>"
set sendmail="/usr/local/bin/nbsmtp -U username -P password -d gmail.com -h smtp.gmail.com -f
username@gmail.com -p 587 -M p -S"
NOTE : ofcourse u have to enter ur username and password
Finally test it out by typing :
echo "It Works" | mutt -s "It Finally works"
heematux@gmail.com
as for recieving here is a site i have found :
http://home.nyc.rr.com/computertaijutsu/mutt.html
and here is my script :
Code:
#!/bin/bash
#
# Apollon check script
#
#
# To use it type : ./check.sh filename
#
FILENAME=(*."$1"*)
FILENAME2=$(ls | grep "$1")
FILENAME3=${FILENAME2#*.}
echo -e "\033[0;31mRunning script now\033[0m"
while true; do
if [ -f "$FILENAME3" ]; then
echo "File $FILENAME3 downloaded" | mutt -s "File Downloaded" email@gmail.com
exit
elif [ -f "$FILENAME" ]; then
echo "File $FILENAME is still being downloaded"
else
echo "File not found"
exit
fi
sleep 300 # sleeps for 5 minutes then checks again
done