Re: Recording Emails Sent

2015-07-27 Thread thanat
Hi, assuming Cakephp 2.x: $Email = new CakeEmail(); //... all the additional email settings $result = $Email->send(); $result['message'] contains the whole email message (txt, html even with attachments), 1. you can parse this to get txt and html parts. 2. option as you wrote, writ

Recording Emails Sent

2015-07-27 Thread #2Will
I'm trying to work out a good way to record all the emails the system has sent. I want to record them to DB, with columns for To, Subject and Message. I don't think that CakeEmail triggers any events or callbacks I can hook into? If I write a custom Log, I think I just get back the Whole messa

Re: CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-27 Thread Mikaël Capelle
Thanks! Exactly what I was looking for. On Monday, July 27, 2015 at 2:29:31 PM UTC+2, Florian Krämer wrote: > > Then use a trait . > > On Monday, July 27, 2015 at 11:32:54 AM UTC+2, Mikaël Capelle wrote: >> >> I cannot do that without multiple inh

Re: CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-27 Thread Florian Krämer
Then use a trait . On Monday, July 27, 2015 at 11:32:54 AM UTC+2, Mikaël Capelle wrote: > > I cannot do that without multiple inheritance (which, as far as I know, > does not exist in php) because as I stated in my post, all my helpers does > no

Re: CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-27 Thread Mikaël Capelle
I cannot do that without multiple inheritance (which, as far as I know, does not exist in php) because as I stated in my post, all my helpers does not inherit a standard CakePHP helpers, for instance I have: class MyHTMLHelper extends HTMLHelper { ... } class MyFormHelper extends FormHelper { ..

Re: CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-27 Thread Florian Krämer
Simple OOP? MySpecialHelper extends MyBaseHelper {...} MyOtherSpecialHelper extends MyBaseHelper {...} And MyBaseHelper implementds addClass(). On Friday, July 24, 2015 at 10:23:43 AM UTC+2, Mikaël Capelle wrote: > > Hi everyone, > > I am writing a CakePHP 3.0 plugins, and I have multiple help