Re: Email Component - Double Send

2010-06-18 Thread John Andersen
Have you confirmed that your data are correct? That is, that you don't
have the same email address twice in the $mail array that you use!
You could for example log each email address that your are sending an
email to.
Enjoy,
   John

On Jun 17, 10:30 pm, alex  wrote:
> Hi, I have used this component with this following snippet code:
>
>                         foreach( $list as $mail ){
>                             $this->Email->subject = 'HermesList';
>                             $this->Email->replyTo = 'i...@alex.it';
>                             $this->Email->from = 'Alex ';
>                                 $this->Email->to = $mail['mails']['mail'];
>
>                                 $this->Email->delivery = 'smtp';
>                                 $this->Email->template = 
> 'email/html/Template/template';
>                                 $this->Email->sendAs = 'html';
>                                 $this->set('titolo', 
> $data['Content']['titolo']);
>                                 $this->set('descrizione', 
> $data['Content']['descrizione']);
>                                 $this->set('mail', $mail['mails']['mail']);
>                                 $this->set('image', $data['Content']['link']);
>                                 $this->Email->send();
>                                 $this->Email->reset();
>                         }
>
> It works fine but some emails are sent twice!!!
> Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Email Component - Double Send

2010-06-18 Thread alex
Hi, I have used this component with this following snippet code:

foreach( $list as $mail ){
$this->Email->subject = 'HermesList';
$this->Email->replyTo = 'i...@alex.it';
$this->Email->from = 'Alex ';
$this->Email->to = $mail['mails']['mail'];

$this->Email->delivery = 'smtp';
$this->Email->template = 
'email/html/Template/template';
$this->Email->sendAs = 'html';
$this->set('titolo', 
$data['Content']['titolo']);
$this->set('descrizione', 
$data['Content']['descrizione']);
$this->set('mail', $mail['mails']['mail']);
$this->set('image', $data['Content']['link']);
$this->Email->send();
$this->Email->reset();
}

It works fine but some emails are sent twice!!!
Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en