Cfmailparam in Lucee 6

upgraded to Lucee 6.2.2.91 and it takes about 8 seconds to process cfmail when the following code is included:

<img src="cid:cLogo" width="370" height="106" alt="Logo" />

<cfmailparam file="https://mysite.com/logo.cfm?file_name=#variables.logo#" contentid="cLogo" disposition="inline" />

when I remove the above code cfmail is sent instantly.

this was never an issue in Lucee 5.

what can be done to fix this issue? as I need to send a logo in the mail being sent out.

OS: Windows Server 2016
Java Version: 21
Tomcat Version: 11.0
Lucee Version: 6.2.2.91

@kevco , I tested this with both Lucee 5.x and 6.2, and it is not a regression — both versions take several seconds to execute when using a remote file with <cfmailparam>
To avoid this delay, you can use a local file instead of a remote URL, which results in much faster execution.

1 Like

i’d pull it with http and then store it in ram and then use it from there.

I’d be fetching the file with cfhttp and writing to a temp file, cfhttp is always going to be more efficient than using resource urls directly (as files), as it ends up doing mutiple http requests, you can see that in action by pointing it at a local cfml endpoint and logging out requests to that file

Mail files are spooled to disk and maybe respooled after a restart, at which point your ram file doesn’t exist and there’s no need to waste ram (ram files maybe be GC’ed if your server is running out of memory too)

1 Like

Note to self, polish and publish TeamCFML Lucee email extensions… (email, queue, tracking too much to do so little time)