5099 Posts in 1519 Topics by 1116 members
|Go to End|
28 August 2009 at 9:48pm
Couple of quick questions. I would like to add a send email button for certain templates in the CMS. How would I go about doing this, and adding recipients for that email? I have looked at http://doc.silverstripe.org/doku.php?id=email but it doesn't really g into that sort of detail.
Also, how could I send images linked to that page via a $has_one as attachments? Can I literally do a Dataobject::get() and load the result into a parameter?
Cheers in advance,
29 August 2009 at 2:21am Last edited: 29 August 2009 2:23am
You should be able to do this with one or more custom email templates.
Link the button to an action on your controller that sets up the template and the email.
You can send custom variables to the template so I think you can get an image in that way.
Use $email->populateTemplate(Your stuff here); to send the content you want to the email template.
|Go to Top|