[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to send mails with attachments for each file in a directory ?



I will check this abit later for now i used :
~/cat sender
#!/bin/bash

uuencode $1 $1 | mail -s Re:pictures someone@gmail.com

and on console :

~/ find *.jpg -exec sender '{}' \;    

it is an ugly but abit working solutione but a user can't see it on gmail (only with client he can see the attachments (icedove) ).


On Jan 29, 2008 7:22 PM, Douglas A. Tutty <dtutty@porchlight.ca> wrote:
On Tue, Jan 29, 2008 at 07:01:47PM +0200, Jabka Atu wrote:
> find  *.jpg -exec uuencode  '{}' '{}' |  mail someone@gmail.com \;
>
> but this won't work since :
>
> find: missing argument to `-exec'
>
> No message, no subject; hope that's ok
> Can't send mail: sendmail process failed with error code 1
>
> when working with only one file :
>
> uuencode  file.jpg file.jpg |  mail someone@gmail.com \;
>
> this works perfectly.

Could you throw xargs into the pipeline somewhere?  It runs a command
once for each line of input.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: