[plug] Emailing - gotchas

James Devenish devenish at guild.uwa.edu.au
Thu Jul 1 13:17:31 WST 2004


Hi,

In message <200407011203.33627 at death.2.spammers>
on Thu, Jul 01, 2004 at 12:03:33PM +0800, Bernd Felsche wrote:
> I write some software that accepts PCL-formatted output and
> transforms it to PDF for emailing to other parties.
[...]
> Unfortunately, I can no longer use the mailing wrapper program for
> generic purposes; not without some changes to detect MIME type and
> rename the file before attaching ... <sigh>

I'm guessing that the following suggestions are ruled out by your
circumstances, but things that popped into my head while reading this
were:
 - Couldn't you have your software write to an output file (or rename
   its output file) with a name that ends in .pdf in the first place,
   before reaching the mail wrapper? Then the mail wrapper would work
   fine?
 - Alternatively, if you were to save the PDF files in binary format,
   without changing their names, I'm guessing that nail should send it
   as application/octet-stream (instead of text/plain). Adobe even has a
   comment in their PDF Reference:

"...it is recommended that the header line be immediately followed by
a comment line containing at least four binary characters --- that is,
characters whose codes are 128 or greater. This will ensure proper
behaviour of file transfer applications that inspect data near the
beginning of a file to determine whether to treat the file's contents
as text or as binary."





More information about the plug mailing list