View previous topic :: View next topic |
Author |
Message |
vert Apprentice
Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Tue Jan 14, 2003 9:05 pm Post subject: Mailing images using a bash script |
|
|
I've set up several scripts on my system that mail me different things of interest everyday (such as portage updates ). This is all done in standard bash. But how can I include pictures (or other binary files) in the mails the bash scripts create? I think it can be done with MIME in some way or something like uuencode. Anybody know how to do this? Thnx! |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Tue Jan 14, 2003 9:15 pm Post subject: |
|
|
have a closer look at mpack: Code: | emerge net-mail/mpack |
cheers
SteveB |
|
Back to top |
|
|
DamnDirtyApe n00b
Joined: 08 Jan 2003 Posts: 38 Location: Prince George, British Columbia, Canada
|
|
Back to top |
|
|
vert Apprentice
Joined: 07 May 2002 Posts: 214 Location: Delft, The Netherlands
|
Posted: Wed Jan 15, 2003 7:51 am Post subject: |
|
|
Well, I toyed with the idea of starting with perl or python or something like that, but I haven't gotten around to that. Would you say that learning such a language is worth the effort for such simple things as scripts for notification mails and simple maintenance (backup for example)? By the way, I got it working with mpack. So I'm happy for the moment |
|
Back to top |
|
|
DamnDirtyApe n00b
Joined: 08 Jan 2003 Posts: 38 Location: Prince George, British Columbia, Canada
|
Posted: Wed Jan 15, 2003 4:05 pm Post subject: |
|
|
vert wrote: | Would you say that learning such a language is worth the effort for such simple things as scripts for notification mails and simple maintenance (backup for example)? |
Absolutely.
Perl has many, many practical applications, not the least of which is sending mail. By having a basic understanding of Perl (and CPAN), you'll have a much easier time with many of the things you do already, and a far better starting point if you ever want to, say, integrate your mailer program with a web application.
If you're looking for a starting point, I highly recommend PerlMonks (http://www.perlmonks.org/). |
|
Back to top |
|
|
|