Re: Emailing a file attachment w/ cron

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

 



On Wed, Jun 02, 2004 at 08:39:03AM -0500, Benjamin J. Weiss wrote:
> From: "Benjamin J. Weiss" <benjamin@xxxxxxxxxx>
> To: "For users of Fedora Core releases" <fedora-list@xxxxxxxxxx>
> Date: Wed, 2 Jun 2004 08:39:03 -0500
> Subject: Re: Emailing a file attachment w/ cron
> Reply-To: For users of Fedora Core releases <fedora-list@xxxxxxxxxx>
> 
> From: "Paul Dubinsky" <pdubinsky@xxxxxxxxxx>
> > I'm using FC1 and I need to email a log file with cron. I'm currently
> using
> > send but send takes the logfile and makes it the body of the email. I want
> > to send it as an attachment. I've Man'ed mail, send and post but none of
> > these explicitly handle attachments.
> >
> > Any suggestions?
> 
> I think that mutt will do this.
> 
> mutt -s "This is the subject" -a attached.file -i body-text.file  anybody@xxxxxxxxxxxxx


Mutt is my tool of choice.  

Pine has the -attach and -attachlist -attach_and_delete command line
flags that have value here.

The key is knowing that the body of the message needs to be
transformed so it is a mime compliant body (Multipurpose Internet Mail
Extensions).

The man page for mime (man mime; metamail package) gives some clue on
how to do this with metamail tools.  One of the tools in the metamail
package that will work is mailto (see also  metasend).

There are more tools... 

   man -k mime 
   apropos mime 

gives a list of tools that are handy for shell
programmers, see also mewcat sendfiles splitmail.

Depending on the scripting language there are more options.
perl-MIME-tools, are handy if you work in perl.  php has multiple MIME
tool kits. Same for ruby, java, javascript, python.

mimetic is a GPL MIME library for C++ folks.
SDK - C programmers .... http://docs.sun.com/source/816-6027-10/mirc.htm


-- 
	T o m  M i t c h e l l 
	/dev/null the ultimate in secure storage.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux