Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attachment being converted to TXT

Status
Not open for further replies.

rdiller

Programmer
Sep 13, 2000
9
US
I've checked all the forums, and come up with nothing... hoepfully someone can help.

I'm generating a PDF on the fly... then I'm looping until the file exists, then attaching it to an email and sending the file. This works about 60% of the time... for some reason occasionally it'll send a ATT000011.txt instead of the PDF attachment. I know the file exists because first my code wouldn't have sent until it did, and furthermore I can look at the server at see the file.

I'm attaching the pdf using :
<CFMAILPARAM FILE=&quot;#pdf_dir##filename#.pdf&quot;>

Is there some other way I can attach it or is there something else I need to include... this used to work fine, it's just been lately.

Thanks.
 
precise the mime format
i can't tell you exactly which (maybe multipart form data ?)
 
This almost sounds like one of the <cfmail> bugs they've had. What version of CF are you running? If it's 4.5, do you have the latest service pack?

If it's not a bug, it may be a timing issue with the file creation. You may be trying to send possibly before any locks from the creation code have cleared. Also, since you said it had been working fine until recently, can you list any changes to the server that happenned around the time it stopped working?

One last question, how are you creating the pdf file? It almost sounds like you're issuing a dos command to trigger an external executable.

GJ
 
I got it figured out last night... even though I was waiting for the file to exist, I guess it wasn't quite long enough for NT to let go of the file. I installed a CFX_wait tag that pauses for a second or two before processing.

Thanks for your help though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top