Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

populateTemplate doesn't correct with SS 2.3 version


Reply


2 Posts   765 Views

Avatar
bebabeba

Community Member, 192 Posts

28 May 2009 at 8:00pm

Hi!
I create forms to sent mail. I use Email_Template() to send mail.
Mail arrive to destination but is empty. I don't see data in fomr and subject.
With last version 2.2 nothig problem Why?

function doSendMail($data, $form)
{
      $e = new Email_Template();
      $e->From = "xx@xx.it";
      $e->To = "xxi@xx.it";
      $e->populateTemplate($data);
      
      $e->Subject = "Hi there";
      $e->Body = "I just really wanted to email you and say hi.";*/
      $e->send();
      
      $form->sessionMessage('xxxxxxx!');
       Director::redirectBack();
}

Avatar
biapar

Forum Moderator, 435 Posts

29 January 2010 at 1:43am

I think that populate data goes before send..