Skip to content

Commit

Permalink
fix: use our new ccs and bccs arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
mbandizzle committed Apr 9, 2021
1 parent f6c8a4e commit dd291f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/protocols/SendGridProtocol.cfc
Expand Up @@ -53,8 +53,8 @@ component extends="cbmailservices.models.AbstractProtocol" {
ccs = normalizeEmailsToArray( mail.cc ).filter( function( email ) {
return !arrayContainsNoCase( tos, email );
} );
if ( ! mail.cc.isEmpty() ) {
personalization[ "cc" ] = mail.cc.map( function( address ) {
if ( ! ccs.isEmpty() ) {
personalization[ "cc" ] = ccs.map( function( address ) {
return { "email" = address };
} );
}
Expand All @@ -65,8 +65,8 @@ component extends="cbmailservices.models.AbstractProtocol" {
bccs = normalizeEmailsToArray( mail.bcc ).filter( function( email ) {
return !arrayContainsNoCase( tos, email ) && !arrayContainsNoCase( ccs, email );
} );
if ( ! mail.bcc.isEmpty() ) {
personalization[ "bcc" ] = mail.bcc.map( function( address ) {
if ( ! bccs.isEmpty() ) {
personalization[ "bcc" ] = bccs.map( function( address ) {
return { "email" = address };
} );
}
Expand Down

0 comments on commit dd291f3

Please sign in to comment.