Date: Fri, 23 Jul 2004 16:07:53 +1000 From: Murray Taylor <murraytaylor@bytecraftsystems.com> To: jaymo@cromagnon.cullmail.com Cc: carla.neves@nereus.pt Subject: Re: How to send attached files on sendmail with mail tool? Message-ID: <1090562873.349.22.camel@wstaylorm.dand06.au.bytecraft.au.com> In-Reply-To: <200407230057.06978.jaymo@cromagnon.cullmail.com> References: <200407162036.i6GKaNt11099@www.plutao.lusodigital.net> <200407202324.30211.jaymo@cromagnon.cullmail.com> <20040721090847.F85700@chylonia.3miasto.net> <200407230057.06978.jaymo@cromagnon.cullmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
man uuencode uuencode [-m] [-o output_file] [file] name he uuencode utility reads file (or by default the standard input) and writes an encoded version to the standard output, or output_file if one has been specified. The encoding uses only printing ASCII characters and includes the mode of the file and the operand name for use by uudecode. This works with winblows - I use it in production here cat file | uuencode tgt_filname | mail -s "subject" test@example.com ^ ^ | +--- attachment FILENAME for the target host to use +--- attachment CONTENT from the source host the input file is via stdin to uuencode - this becomes the CONTENT of the attachment the File name given to the ATTACHMENT is the tgt_filename The result is an email with only on thing inside it - the attachment. On Fri, 2004-07-23 at 15:57, Jay Moore wrote: > On Wednesday 21 July 2004 02:10 am, Wojciech Puchar wrote: > > > > cat file | uuencode tgt_filname | mail -s "subject" test@example.com > > > > uuencode <tgt_filname | mail -s "subject" test@example.com > > > > instead of cat. less one unneeded piping. > > > > > > subject can be derived from shell script variables if necessary. > > > > > > Do you have to do a uudecode on the receiving end to recover the file? > > > > > > I tried this - sending a pdf file from this FreeBSD system to a Windoze > > > user that gets mail via POP - it didn't work. The filename came through, > > > and it was listed as an attachment, but there was nothing useful in the > > > file. > > > > i think windoze just can't decode uuencoded attachments right. > > > > it only supports base64 right. > > > > metamail will be useful, possibly > > > > /usr/local/bin/encode-base64 was installed by package p5-MIME-Base64-2.21 > > I'm sure you are correct about Windows... I guess the point I was trying to > make is that I think Base64 encoding and appropriate MIME headers are > required to be placed in the message to make it a "compliant" message. So > while this script may work in certain limited situations, it's probably not a > good "general purpose" solution. > > Jay > > **************************************************************** > This Email has been scanned for Viruses by MailMarshal. > **************************************************************** -- Murray Taylor Special Projects Engineer --------------------------------- Bytecraft Systems & Entertainment P: +61 3 8710 2555 F: +61 3 8710 2599 D: +61 3 9238 4275 M: +61 417 319 256 E: murraytaylor@bytecraftsystems.com or visit us on the web http://www.bytecraftsystems.com http://www.bytecraftentertainment.com --------------------------------------------------------------- The information transmitted in this e-mail is for the exclusive use of the intended addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material. E-mails may not be secure, may contain computer viruses and may be corrupted in transmission. Please carefully check this e-mail (and any attachment) accordingly. No warranties are given and no liability is accepted for any loss or damage caused by such matters. --------------------------------------------------------------- **************************************************************** This Email has been scanned for Viruses by MailMarshal. ****************************************************************
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1090562873.349.22.camel>