Should the model or controller be responsible for sending emails?

2012-05-15 Thread Thiago Colares
In wich layer do you commonly implement (use the CakeMail object) to sen emails? By the way, we have been implementing applications with "fat model", instead of "fat controller". We believe this way the code is really more reusable. We've also read some Mark's (Story) posts that initially enco

Re: sending emails question

2012-04-08 Thread heohni
Yes, ok. Thanks! I wasn't never really aware of looking into the core files *shame* Am Samstag, 7. April 2012 18:37:15 UTC+2 schrieb heohni: > > Hi, > > I having a newsletter registration where I want to send an email to the > user and to the admin. > For now I only send to user this way: > // se

Re: sending emails question

2012-04-07 Thread euromark
but the code is still open source (and not encrypted) - and with a quick glance at its method the question would have resolved itself. https://github.com/cakephp/cakephp/blob/2.1/lib/Cake/Network/Email/CakeEmail.php#L1079 Am Samstag, 7. April 2012 21:04:00 UTC+2 schrieb heohni: > > Because her

Re: sending emails question

2012-04-07 Thread heohni
Because here: http://book.cakephp.org/2.0/en/core-utility-libraries/email.html#CakeEmail is no reset mentioned. Am Samstag, 7. April 2012 18:37:15 UTC+2 schrieb heohni: > > Hi, > > I having a newsletter registration where I want to send an email to the > user and to the admin. > For now I only

Re: sending emails question

2012-04-07 Thread euromark
why dont you try it out? also - why not looking into the class and its documentation there you would have probably found the reset() method Am Samstag, 7. April 2012 18:37:15 UTC+2 schrieb heohni: > > Hi, > > I having a newsletter registration where I want to send an email to the > user and to t

sending emails question

2012-04-07 Thread heohni
Hi, I having a newsletter registration where I want to send an email to the user and to the admin. For now I only send to user this way: // send email to user to confirm $email = new CakeEmail(); $email->helpers(array('Html', 'Text')); . $email->send(); How do I send another email to admin n

Re: Error when sending emails

2011-12-22 Thread AD7six
On Dec 22, 12:01 pm, heohni wrote: > Hi, > > when I send an email I get this errors: > Warning (2): array_map() [http://php.net/function.array-map]: Argument > #2 should be an array [COREcake/libs/controller/components/email.php, > line 583] > Warning (2): implode() [http://php.net/function.impl

Error when sending emails

2011-12-22 Thread heohni
Hi, when I send an email I get this errors: Warning (2): array_map() [http://php.net/function.array-map]: Argument #2 should be an array [COREcake/libs/controller/components/email.php, line 583] Warning (2): implode() [http://php.net/function.implode]: Invalid arguments passed [COREcake/libs/contr

regarding using phpmailer for sending emails

2009-09-07 Thread ruchika batra
i am getting the following error while using phpmailer Call to undefined function _errormsg() in *phpmailer\class.phpmailer.php.**Can anyone suggest what the prob cud be?* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Sending emails in console scripts

2009-04-05 Thread tekomp
This works for me... class ExampleShell extends Shell { var $uses = array('Example'); function main() { App::import('Component', 'Email'); $this->Email = new EmailComponent(null); $body = 'asdf'; $this->Email->fro

Re: Sending emails in console scripts

2009-04-04 Thread stain
arning:  Invalid argument supplied for foreach() in > /usr/share/cake/libs/controller/components/email.php on line 457 > > Line 457 is: > >         if (!empty($this->bcc) && $this->delivery != 'smtp') { >                 $this->__header[] = 'Bcc: ' .impl

AW: Sending emails in console scripts

2009-04-03 Thread Liebermann, Anja Carolin
27;smtp') { $this->__header[] = 'Bcc: ' .implode(', ', array_map(array($this, '__formatAddress'), $this->bcc)); } Well... Bcc is clearly empty in my setup so im am wondering where this error comes from. Any hints are apprecia

AW: Sending emails in console scripts

2009-04-03 Thread Liebermann, Anja Carolin
ion. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von goncalo.marr...@gmail.com Gesendet: Mittwoch, 21. Januar 2009 13:20 An: CakePHP Betreff: Sending emails in console scripts Hi. I'm writing a console shell that needs to send emails

Sending emails in console scripts

2009-01-21 Thread goncalo.marr...@gmail.com
Hi. I'm writing a console shell that needs to send emails. I want to use the EmailComponent but the only way i've managed to get it to work is to manually create an instance of AppController an pass it to a manually created instance of EmailComponent. My code: App::import('Core', 'Controller');

Re: Consensus on sending emails?

2007-09-23 Thread Dr. Tarique Sani
On 9/23/07, dyssident <[EMAIL PROTECTED]> wrote: > > Im getting ready to implement text/html confirmation emails. Google > turns up lots of great proposals cake-y ways of going about it so Im > wondering if any one of them has been taken up as the preffered > method. Use CakePHP v1.2 since there

Consensus on sending emails?

2007-09-23 Thread dyssident
Im getting ready to implement text/html confirmation emails. Google turns up lots of great proposals cake-y ways of going about it so Im wondering if any one of them has been taken up as the preffered method. Any suggestions are appreciated. Thanks --~--~-~--~~~---~

Re: Sending emails

2007-02-13 Thread jinhr
My codes works for HTML, on cake_1.2.0.4451alpha //File controllers/requests.php class RequestsController extends AppController { var $name = "Requests"; var $uses = array(...); var $components = array('Email'); fun

Re: Sending emails

2007-02-13 Thread jinhr
Hi, Andrzej: My codes work OK for "html", for "text", but NOT for "both". I think EmailCompotent still has problem (email.php version 4410 under cake_1.2.0.4451alpha). Here are codes for the three files: /// //File controllers/requests.php

Re: Sending emails

2007-02-13 Thread jinhr
DCCC This E-mail is auto-generated by DCCC /// //File views/elements/email/html/default.ctp Hello, a new request submitted! URL http://server/requests/

Re: Sending emails

2007-02-13 Thread GreyCells
If you are using $this->Email->send('Simple email content'); then you need to explicitly set the template to null. See: https://trac.cakephp.org/ticket/2105 ~GreyCells (Thought I'd sent this earlier, but it didn't show up...?) On Feb 13, 12:17 pm, "thequietlab" <[EMAIL PROTECTED]> wrote: > @F

Re: Sending emails

2007-02-13 Thread GreyCells
If you are using $this->Email->send('Simple email content'); then you need to explicitly set the template to null. See: https://trac.cakephp.org/ticket/2105 ~GreyCells (Thought I'd sent this earlier, but it didn't show up) On Feb 13, 12:17 pm, "thequietlab" <[EMAIL PROTECTED]> wrote: > @Felix

Re: Sending emails

2007-02-13 Thread thequietlab
@Felix : thanks, I'll try your snippet and I'll let you know @Sergei : oh man..using mail() is not really convenient when you want to send html + txt version, attachments etc. that's why soft like phpmailer or swiftmailer came out.. making our life easier :) Now I hope cakephp EmailComponent will

Re: Sending emails

2007-02-12 Thread Sergei
You dont need to use any components for sending emails. Just use mail() php function from your controller actions. On 13 фев, 05:38, "thequietlab" <[EMAIL PROTECTED]> wrote: > hi everybody, > > I'm kind of new to cakephp and from time to time I drown into some >

Re: Sending emails

2007-02-12 Thread Felix Geisendörfer
7;ip'], $content['name'], etc. ... Let me know if this helps, -- Felix Geisendörfer aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de thequietlab wrote: > hi everybody, > > I'm kind of new to cakephp and from time to t

Sending emails

2007-02-12 Thread thequietlab
hi everybody, I'm kind of new to cakephp and from time to time I drown into some problems :) Now I stucked with sending emails, I tried the new EmailComponent from version 1.2 which is described in a bakery but somehow had problems with passing variables to my views, not even saying that my