Register
It is currently Fri Jul 25, 2014 7:46 am

When using mutt to send files and emails with bash.....


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Wed Aug 16, 2006 2:03 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 662
Location: Des Moines, Iowa
When using mutt to send files and emails with bash.....

one of the things i noticed right away on my suse systems is that you MUST have in your

.muttrc file a spot that says

set from=


# Sample ~/.muttrc for SuSE Linux
# Setting

set from="youremailaddresshere@youremailprovider.com"

set pager_context=4
set pager_index_lines=10
set pager_stop



If you DON'T have that set from= set....you will end up with errors that say.....

Bad IDN in "from": '(null)' or something to that effect.....

Just thought i'd pass it along to anyone trying to use mutt in a shell script and they run into that error ;)

format for sending mail in shell scripts with mutt is .....

Code:

mutt -a $ATTFILE -s "$SUBJECT" $MAILTO < $TXTFILE



Hope that helps someone else besides me ;)


Top
 Profile WWW  
 PostPosted: Wed Aug 16, 2006 3:05 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 662
Location: Des Moines, Iowa
Code:
elm -s"$SUBJECT" -A $ATTFILE $MAILTO < $TXTFILE

uuenview -m $MAILTO -b -a $ATTFILE < $TXTFILE

nail -s "$SUBJECT" -a $ATTFILE $MAILTO < $TXTFILE

uuencode $ATTFILE $ATTFILE | mail -s "$SUBJECT" $MAILTO

(uuencode $FILE1 $FILE1; uuencode $FILE2 $FILE2) | mail -s "$SUBJECT" $MAILTO


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP