Hi all,

Howie, I hacked a couple new features into the cfx_iMSMail tag which I'd love to see 
included in an official release.  They're very simple (this was my first Delphi 
experience and I managed to spend only about an hour, so... must be simple!).  I can 
of course send you my hacked code snippets if you want, but I'm sure it'll take only a 
few minutes to make these changes (more elegantly than I did too).  Here's what I 
added/changed:

1) New attribute HEADERPASSTHROUGH which lets you specify a pre-formatted header block 
instead of inserting each header as an attribute.  Example:

  HEADERPASSTHROUGH="To: Howie
From: Max
Subject: CFX tag
X-Bizzare-Header: foobar"

This lets me pre-assemble a header block and simply pass it to the tag (my specific 
use currently is to loop over existing headers from a ODSMIME tag execution and only 
filter out certain headers but keep most of the originals, some of which can't be 
predicted).  Then only tricky part code-wise here was to make sure the header block is 
properly delimited with CR+LF (Chr(13)+Chr(10)) for which I used the AddToMessage() 
function (since it already does that).  I have it stick in these headers first, then 
add any more that are passed via HEADER_ attributes (so the passthrough header block 
would come first in mail file).

2) New attribute SETDATE="yes/no" which specifies whether to add a date header to the 
tag or not.  Default is it's current behavior which is to add a date unless a 
HEADER_Date attribute was found in the tag call.  Obviously this is for avoiding 
duplicate Date headers when using the new HEADERPASSTHROUGH attribute.

3) Do not automatically MimeEncode the email if attributes ATTACHMENTS, 
RFC822ATTACHMENT, or HTML are passed but are blank.  I found that if you pass these 
attributes to the tag but they're blank, the tag will add the mime encoding headers 
anyway (making it "seem" like the mail has an attachment).  If found this annoying so 
I changed it (just an appearance thing really).


I think that was it.  Let me know what you think or if I can clarify anything.

Thanks!
-Max



========================================================================
     This list server is Powered by iMS
   'The Swiss Army Knife of Mail Servers'
   --------------------------------------
To leave this list please complete the form at 
http://www.coolfusion.com/iMSSupport.cfm
Need an iMS Developer license?  Sign up for a free license here:
http://www.coolfusion.com/iMSDevelopers.cfm
List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
========================================================================

Reply via email to