Hi, have a question pertaining to the variable scope for email templates:
$mydo = new MyDataObject(); // assume prepopulated; contained a data field named "Subject" accessed by $mydo->Subject
$From = "sender@email.com";
$To = "receiver@email.com";
$Subject = "My Email Subject";
$email = new Email($From, $To, $Subject);
$email->setTemplate('TemplateEmail');
$email->populateTemplate($mydo);
$email->send();
The part that I am having issues with is the dataobject's field and the declared variable "$Subject"
In my "TemplateEmail", when I tried to access "$Subject", it should be rightfully accessing the value stored in $mydo->Subject, but what I am experiencing atm is the value stored as "My Email Subject" being printed in the template instead;
The code in the template for accessing the data is simply
$Subject.XML
Am I missing anything?