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.

Customising the CMS /

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

email send problem :silverstripe 2.3.1


Go to End


1468 Views

Avatar
amarbhanu

Community Member, 57 Posts

17 June 2009 at 5:34pm

Edited: 17/06/2009 6:04pm

please help me when write this code :

$email = new Email_Template();
$email->ss_template = 'ContactUsEmail';
$email->populateTemplate($fields);
$email->subject = 'Subject';
$email->from = 'blah@blah.com';
$email->to = 'blah@blah.com';
$email->send();

then error msg:
[Notice] Undefined variable: fields

please suggest me where declear $fields code, or if wrong code then suggest or send link for help me.........