[Techtalk] auto email with attachments

Conor Daly conor.daly-linuxchix at cod.homelinux.org
Fri Jul 6 00:53:49 UTC 2007


On Thu, Jul 05, 2007 at 11:09:58AM -0700 or so it is rumoured hereabouts, 
gossamer axe thought:
> I was curious if anyone has done this.  I want to auto email with
> attachments (pictures) using the mail app.  So say I have a directory with 5
> pictures
> 
> mustang1.jpg
> mustang2.jpg
> mycar.jpg
> mydog.jpg
> mycat.jpg
> 
> and I want to auto email these to an email address without having to send
> each one by hand.  I was thinking of a script with a pause in it with sleep.
> I have to send these one at a time for yahoos file size limit.
> 
> for file in *
> do
> ...
> sleep 60
> ...
> 
> I've looked at the mail man page but didn't see anything about adding file
> attachments with mail.

Last time I tried this with mail, I had to mess around with uuencode.
However, mutt will quite happily attach stuff from the commandline.

mutt -a $file -s "Image attachment" < /dev/null

will work fine.  

Conor
-- 
Conor Daly <conor.daly at cod.homelinux.org>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/G/S/O d+(-) s:+ a+ C++(+) UL++++ US++ P>++ L+++>++++ E--- W++ !N
PS+ PE Y+ PGP? tv(-) b+++(+) G e+++(*) h-- r+++ z++++ 
------END GEEK CODE BLOCK------
http://www.geekcode.com/ http://www.ebb.org/ungeek/


More information about the Techtalk mailing list