I have an ampscript that personalizes subject lines based on email name. Is there a way to prevent an email from sending if the email name doesn't match any of the criteria? I know I can use RaiseError but that will still count as a send in salesforce and I want to abort all sends for that particular email. I also don't want to use a fallback in this scenario, I just want to prevent the send.
if @EmailName == “Coastal_send_01” then set @subjectLine = “Your reward is here” set @preheader = "Take $10 off your next order”elseif @EmailName == “Coastal_send_02” then set @subjectLine = "Only a few days left to save" set @preheader = "Use your $10 off coupon before it expires"elseendif
So if an email is accidentally named "Coastal_send" how do I prevent it from sending completely? Right now it will send with an empty subject line.