Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse tokens error when 'type' property does not exist #36

Open
jeff-chastain opened this issue Nov 22, 2023 · 0 comments
Open

Parse tokens error when 'type' property does not exist #36

jeff-chastain opened this issue Nov 22, 2023 · 0 comments

Comments

@jeff-chastain
Copy link
Contributor

What are the steps to reproduce this issue?

  1. Create a new instance of the Mail.cfc object, passing a collection of parameters to the init method that does NOT include a 'type' parameter
  2. Attempt to send the Mail object ([object].send());

What happens?

An error is throw in the parseTokens method due to the recently added check for the mail type (line 380)

	// Do not process tokens if using dynamic template (send-grid-protocol)
	if ( arguments.mail.getType() == "template" ) return;
The property (Type) doesn't exist. Valid properties are leadId,mailParams,environment,mailParts,source,associationName,notes,customerId,agentId,subject,bodyTokens,to,additionalInfo,additionalJSONData,conversationMessageId,uniqueId,cc,from,fromName,body,bcc

What were you expecting to happen?

The code should execute without error, bypassing this check as there is no 'type' property defined on the object.

Any logs, error output, etc?

Any other comments?

What versions are you using?

Operating System:
Package Version: 2.8.1

@jeff-chastain jeff-chastain mentioned this issue Nov 22, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant