Skip to content

Commit 994963f

Browse files
Email Type Check Fix
Fixes an issue in the newly introduced code to check the 'type' property of the mail object when parsing the tokens. 'Type' is not a required property of the mail object, so there are conditions when this property does not exist and therefore this code causes an error.
1 parent 344f5b0 commit 994963f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/MailService.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ component accessors="true" singleton threadsafe {
377377
var key = "";
378378

379379
// Do not process tokens if using dynamic template (send-grid-protocol)
380-
if ( arguments.mail.getType() == "template" ) return;
380+
if ( arguments.mail.propertyExists( "type" ) && arguments.mail.getType() == "template" ) return;
381381

382382
// Check mail parts for content
383383
if ( arrayLen( mailparts ) ) {

0 commit comments

Comments
 (0)