Script version of cfmail doesn't recognise attributeCollection

Description

Using the script version of cfmail and passing in attributes via attributeCollection fails with the exception message: "attribute from is required for statement mail".

mailAttributes={ from: "from@test.com" ,to: "to@test.com" ,subject: "TEST" }; mail attributeCollection=mailAttributes { echo( "Hello" ) };

Previously raised against Railo 4.2 as RAILO-3150 https://issues.jboss.org/browse/RAILO-3150

Environment

None

Activity

Pothys - MitrahSoft 
5 December 2016 at 15:07

I've analyzed a lot and found that. Using attribute collection for cfmail in script based it throws error in Lucee. But In ACF It shouldn't. Both are working fine for tag based attributeCollection.

Script based code equivalent for cfmail

<cfscript> objAttributes = { To = "test@test.com", From = "test@lucee.org", Subject = "test mail", server = "127.0.0.1:2526" }; cfmail(attributeCollection = #objAttributes#); </cfscript>

It fails in Lucee. But In ACF, it working fine. Lucee just ignore attributecollection in script

Tag based code equivalent for cfmail

<cfset objAttributes = { To = "test@test.com", From = "test@lucee.org", Subject = "test mail", server = "127.0.0.1:2526" }> <cfmail attributecollection=#objAttributes#> <b>This tag based mail</b> </cfmail>

It's working fine for both ACF and Lucee.

Julian Halliwell 
2 October 2015 at 11:02
(edited)

The same applies to the script of log and therefore probably all tags in script.

Fixed

Details

Assignee

Reporter

Priority

Labels

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

Sprint

Affects versions

Created 10 September 2015 at 13:59
Updated 6 February 2017 at 21:10
Resolved 6 February 2017 at 21:10