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.

Customising the CMS

Send email button


2 Posts   1033 Views


28 August 2009 at 9:48pm Community Member, 509 Posts

Hi All,

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 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), Community Member, 288 Posts

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.