[plug] Emailing - gotchas
Bernd Felsche
bernie at innovative.iinet.net.au
Thu Jul 1 13:50:31 WST 2004
On Thursday 01 July 2004 13:17, James Devenish wrote:
> 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?
In this case; no. The mailing wrapper mails the standard input as an
attachment to the address(es) designated on the command line.
The GhostPCL does indeed create a temporary PDF, but the nature of
the application flow is that the delivery of the document takes
place in a pipeline.
This project, FWIW, is an output multiplexer that behaves in the
same way as a "printer" (lpr -equivalent command) as far as the main
enterprise applications are concerned.
Traditionally, the output contains many individual documents that
are printed to the same destination - then folded and placed in
envelopes before physical mailing.
This project is to; for each document type and addressee, either
print, email or fax the document according to each addressee's
preference; with the option of different handling for "re-prints".
Other than a few teething problems, the implementation has been
remarkably straight-forward; even the PCL formatted output that's
done by a proprietary application (Formtrap) getting mangled into
PDF.
I started off writing a lot of code and complicated application over
several weeks; then I lost the lot in a "hard disc failure"
(minor/major oops on my part). The customer was screaming for it, so
I backed off a few steps from what I was doing and realized how to do
it in a handful of sub-hundred-line programs; written in an
afternoon.
The mailing wrapper is but one delivery method. Others are to send
to fax; to print on any accessible printer, or any other "method"
that takes an arbitrary input, transforms it to a suitable output
format for that delivery method (and possibly destination) and then
initiates delivery.
"Simple" program; complex function. It's simple because it's based
on the Unix paradigm of tool-building. Re-use of existing building
blocks. I try to remain consistent with that.
> - 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:
<snip>
PDF is sacred territory as far as I'm concerned.
I don't dabble with the output unless it's unavoidable.
--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ / ASCII ribbon campaign | I'm a .signature virus!
X against HTML mail | Copy me into your ~/.signature
/ \ and postings | to help me spread!
More information about the plug
mailing list