• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

deleting file after sending an email with attachment

New Here ,
Dec 12, 2006 Dec 12, 2006

Copy link to clipboard

Copied

Hi,

I have looked in the forums and have not found any reference to it.
I need to send an email with an attachment that is sourced via a form.

The problem that I am having is that when I include the code to delete the file from the directory, the cfmail fails to execute. When I do not include the code to delete the file, it works fine.
Any ideas?

I tried with both, virtual and physical paths.
TOPICS
Advanced techniques

Views

223

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Dec 12, 2006 Dec 12, 2006
You need to allow time for the email to be sent.

Figure 60 seconds or 60 seconds plus your spool interval (if spooling is on (it should be)) -- whichever is larger.

It would be better not to delete the file here.

Set up a scheduled task that deletes files in the target directory that are, say, 24 hours old.

Votes

Translate

Translate
Advisor ,
Dec 12, 2006 Dec 12, 2006

Copy link to clipboard

Copied

LATEST
You need to allow time for the email to be sent.

Figure 60 seconds or 60 seconds plus your spool interval (if spooling is on (it should be)) -- whichever is larger.

It would be better not to delete the file here.

Set up a scheduled task that deletes files in the target directory that are, say, 24 hours old.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation