>>On our intranet I have a form set up so I can take a look at
>>messages that end up in the CFUSION/MAIL/UNDELIVR.  It uses CFFILE to
>>
> bring
> 
>>the contents of a particular message into a textarea.  Then I can modify a
>>malformed e-mail address if I can, and re-write the file to the SPOOL
>>directory to be resent.
>>
>>This works fine, but when the messages go through they appear not to have
>>
> a
> 
>>subject or a to: field.  Does anyone have any idea why?  Below is an
>>
> example
> 
>>of a message as read by CFFILE from the UNDELIVR folder:
>>
>>x-cf-version: 4.5.0
>>x-cf-server: 131.187.108.254
>>x-cf-port: 25
>>x-cf-timeout: 180
>>x-cf-from: "Owen Leonard" <[EMAIL PROTECTED]>
>>x-cf-to: "Owen Leonard" <[EMAIL PROTECTED]>
>>
>>
>>Content-type: text/plain
>>
>>Date: Tue, 23 Oct 2001 14:14:42 -0400
>>
>>From: "Owen Leonard" <[EMAIL PROTECTED]>
>>
>>Subject: This is a subject
>>
>>To: "Owen Leonard" <[EMAIL PROTECTED]>


If it really looks like this the reason is that the headers end when the 
first double CRLF is detected. So they should end up in the body of the 
email message. Make sure that the email looks something like below when 
you rewrite it to the spoolfolder (and beware of the addnewline 
attribute of CFILE):

x-cf-version:#chr(32)#4.5.0#chr(13)##chr(10)#x-cf-server:#chr(32)#131.187.108.254#chr(13)##chr(10)#x-cf-port:#chr(32)#25#chr(13)##chr(10)#x-cf-timeout:#chr(32)#180#chr(13)##chr(10)#x-cf-from:#chr(32)#"Owen#chr(32)#Leonard"#chr(32)#<[EMAIL PROTECTED]>#chr(13)##chr(10)#x-cf-to:#chr(32)#"Owen#chr(32)#Leonard"#chr(32)#<[EMAIL PROTECTED]>#chr(13)##chr(10)##chr(13)##chr(10)#Content-type:#chr(32)#text/plain#chr(13)##chr(13)##chr(10)#Date:#chr(32)#Tue,#chr(32)#23#chr(32)#Oct#chr(32)#2001#chr(32)#14:14:42#chr(32)#-0400#chr(13)##chr(13)##chr(10)#From:#chr(32)#"Owen#chr(32)#Leonard"#chr(32)#<[EMAIL PROTECTED]>#chr(13)##chr(13)##chr(10)#Subject:#chr(32)#This#chr(32)#is#chr(32)#a#chr(32)#subject#chr(13)##chr(13)##chr(10)#To:#chr(32)#"Owen#chr(32)#Leonard"#chr(32)#<[EMAIL PROTECTED]>#chr(13)
##chr(13)##chr(10)##chr(13)##chr(13)##chr(10)#body#chr(32)#of#chr(32)#message
[unwrap if wrapped]

This is based on addnewline="No" and created using cfscript so CF does 
not insert any other linebreaks/whitespace.

For an example download cf_advancedemail from 
http://jochem.vandieten.net/coldfusion/customtags/ (but don't actually 
use it untill version 2 is released, it has bugs in different areas).

Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to