Mail attachment file not unique using content attribute

Description

When specifying a binary variable for the 'content' attribute, Lucee will try to write the binary to a temporary file. The file will be saved with the 'file' attribute as it's filename.

When multiple emails are send with the same filename as an attachment it will overwrite the file of the previous email en delete the file after the mail has been send.
The next email that has been queued will throw an exception since the file (with the same name) has already been deleted.

I have attached a code example to reproduce the problem.

this When specifying a binary variable for the 'content' attribute, Lucee will try to write the binary to a temporary file. The file will be saved with the 'file' attribute as it's filename.

When multiple emails are send with the same filename as an attachment it will overwrite the file of the previous email en delete the file after the mail has been send.
The next email that has been queued will throw an exception since the file (with the same name) has already been deleted.

I have attached a code example to reproduce the problem.

This has been tested in Lucee 4.5. I've checked the Lucee code and it seems that this has not been fixed in 5.1 yet.

Environment

None

Attachments

1

Activity

Show:

Zac Spitzer 23 January 2025 at 09:48

Pothys - MitrahSoft 28 November 2016 at 14:59

I've tested this ticket & confirmed the issue happening on latest version of lucee. But the error is not produced ACF 11.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 22 November 2016 at 10:02
Updated 23 January 2025 at 09:48
Resolved 15 December 2016 at 15:50