Let an email script fail to prevent an email send | Community
Skip to main content
Level 3
September 11, 2021
Solved

Let an email script fail to prevent an email send

  • September 11, 2021
  • 1 reply
  • 1347 views

Hi,

I am using a trigger-based smart campaign to send an email. And I'd like to check upon email rendering, not in the smart list, if certain prerequisite are available in a specific way, and, if not, let the email send fail. I think I recall that an error during velocity parsing results in a sort of soft bounce/fail for the email send. How would I provoke that in practice? I.e., as strange as it might sound, I am looking for a code example in the veins of:

 

#if( ... ) Provoke velocity error/bounce #end

 

TY.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman
#macro( throw ) #set( $zeroLengthList = [] ) ${zeroLengthList[0]} #end

 

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 11, 2021
#macro( throw ) #set( $zeroLengthList = [] ) ${zeroLengthList[0]} #end