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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1035 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..