I'm trying to send 3 different email using a single email template and visualforce component. I'm using rendered to display the text in html email vf component based on conditions. However, when I'm trying to add 3 different subject lines in email template subject, it does not let me save and throws and error : 'syntax error'.
I'm not sure what's wrong here. any help would be much appreciated.
Cheers! :)
<messaging:emailTemplate subject="{!If({RelatedTo.order_status__c} =='Cancelled','Revision Required for Trade Event Order : {!RelatedTo.Name}',{!If({RelatedTo.order_status__c} == 'Approval Requested','Approval Requested For : {!relatedTo.Name}','Approved')})}" recipientType="User" relatedToType="GTS3_Trade_Event__c">
<messaging:htmlEmailBody >
<c:TradeEventOrder_CancelAndSubmission tradeEventOrderId="{!relatedTo.Id}"/>
</messaging:htmlEmailBody>
</messaging:emailTemplate>