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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

populateTemplate doesn't correct with SS 2.3 version


Go to End


2 Posts   960 Views

Avatar
bebabeba

Community Member, 193 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..