I have a triggered send by way of a Transactional API email (Journey Builder > Create Transactional Email). The email's body looks like:
%%[ if indexOf([Template Body], "You have an unsubmitted application for") > 0 then RaiseError("Unsubmitted Application Email detected, stopping send"); endif if [Send Mail] == 0 and [Send SMS] == 1 then set @mobileNumber = [Recipient Phone Number] set @messageText = [Template Body] set @regex = "\<.*?\>" set @outputMessageText = RegExMatch(@regex, @messageText, 0) set @url = Concat('https://cloud.xxx.domain.com/temp?mobileNumber=',@mobileNumber,'&message=',@outputMessageText) set @result = HTTPGet(@url) RaiseError("Send Mail attribute in TSDE is FALSE, stopping email send") endif if [Send Mail] == 0 and [Send SMS] == 0 then RaiseError("Send Mail attribute in TSDE is FALSE, along with Send SMS. Stopping email send") endif ]%%
However when I execute this triggered send and pass False for Send Mail and True for Send SMS, I still receive the email. However when I "Preview and Test" the email with that same triggered send data extension record, the preview will fail to generate due to the RaiseError(...). What might be going on???