Jump to:

22993 Posts in 11595 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » populateTemplate doesn't correct with SS 2.3 version

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

Page: 1
Go to End
Author Topic: 715 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    populateTemplate doesn't correct with SS 2.3 version Link to this post

    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();
    }

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: populateTemplate doesn't correct with SS 2.3 version Link to this post

    I think that populate data goes before send..

    715 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.