Re: Email::send() in a loop. (1.2.x.x)
Now I'm confusedCDMoyer, you posted the link to the ticket, but did you read it? One reply says you need to reset(), the other reply says that the header problem was fixed 6 months ago... Right, this is not the header issue, and just like in the bug I linked, reset() is not the ideal solution. (that bug was closed with Email-reset() and them opened and fixed as requested) reset() would reset all the fields, whereas my application only changes the to: field and calls send. If that's not a supported use, that's fine, it just seems like a pretty common scenario Has everybody forgotten how to search? Wow, I actually did search, I swear. Firefox autocompletes the search form up above: Email body duplicate Email send() duplicate Email send() email body double I fail. ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
OK, gotcha... Posting fixes here isn't going to help dude...You heed to head over to trac and submit a NEW ticket... On Tue, Apr 8, 2008 at 1:05 AM, CDMoyer [EMAIL PROTECTED] wrote: Now I'm confusedCDMoyer, you posted the link to the ticket, but did you read it? One reply says you need to reset(), the other reply says that the header problem was fixed 6 months ago... Right, this is not the header issue, and just like in the bug I linked, reset() is not the ideal solution. (that bug was closed with Email-reset() and them opened and fixed as requested) reset() would reset all the fields, whereas my application only changes the to: field and calls send. If that's not a supported use, that's fine, it just seems like a pretty common scenario Has everybody forgotten how to search? Wow, I actually did search, I swear. Firefox autocompletes the search form up above: Email body duplicate Email send() duplicate Email send() email body double I fail. ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
In the interim I guess you can just set your body manually in the loop. On Apr 8, 1:05 am, CDMoyer [EMAIL PROTECTED] wrote: Now I'm confusedCDMoyer, you posted the link to the ticket, but did you read it? One reply says you need to reset(), the other reply says that the header problem was fixed 6 months ago... Right, this is not the header issue, and just like in the bug I linked, reset() is not the ideal solution. (that bug was closed with Email-reset() and them opened and fixed as requested) reset() would reset all the fields, whereas my application only changes the to: field and callssend. If that's not a supported use, that's fine, it just seems like a pretty common scenario Has everybody forgotten how to search? Wow, I actually did search, I swear. Firefox autocompletes the search form up above:Emailbody duplicateEmailsend() duplicateEmailsend()emailbody double I fail. ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
On Apr 8, 3:05 am, CDMoyer [EMAIL PROTECTED] wrote: Now I'm confusedCDMoyer, you posted the link to the ticket, but did you read it? One reply says you need to reset(), the other reply says that the header problem was fixed 6 months ago... Right, this is not the header issue, and just like in the bug I linked, reset() is not the ideal solution. (that bug was closed with Email-reset() and them opened and fixed as requested) reset() would reset all the fields, whereas my application only changes the to: field and calls send. If that's not a supported use, that's fine, it just seems like a pretty common scenario Lol, now I understand your problem. reset() wont work for you. But in the trac seems like the fix was made, so you are on track to send that multiple mails! Cheers, mbavio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
Posting fixes here isn't going to help dude...You heed to head over to trac and submit a NEW ticket... I'm just following the instructions on Trac that say to always mail the list first if you think something is a bug. ;) In the interim I guess you can just set your body manually in the loop. That's what I'm doing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
Has everybody forgotten how to search? http://groups.google.com/group/cake-php/browse_thread/thread/f71da62dc353b315/84b00fbeda1df451?hl=enlnk=gstq=email+reset#84b00fbeda1df451 That post hasnt two days. Please, search before post, ALWAYS! Cheers, mbavio On Apr 6, 7:01 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Sun, Apr 6, 2008 at 11:30 AM, CDMoyer [EMAIL PROTECTED] wrote: I ran into this the other day, I think the behavior is a bit unexpected, and probably a bug. If you do something like: $this-Email-subect = 'Hi!'; $this-Email-from = '[EMAIL PROTECTED]'; foreach ($recipient as $r) { $this-Email-to = $r; $this-Email-send(sprintf($body, $r)); } Essentially, setting up the basic email, and then looping over people and sending by passing the body to send(), the contents of the body get appended to the last send. Try $this-Email-reset() after you send the mail. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
Now I'm confusedCDMoyer, you posted the link to the ticket, but did you read it? One reply says you need to reset(), the other reply says that the header problem was fixed 6 months ago... I'm confused. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Email::send() in a loop. (1.2.x.x)
I ran into this the other day, I think the behavior is a bit unexpected, and probably a bug. If you do something like: $this-Email-subect = 'Hi!'; $this-Email-from = '[EMAIL PROTECTED]'; foreach ($recipient as $r) { $this-Email-to = $r; $this-Email-send(sprintf($body, $r)); } Essentially, setting up the basic email, and then looping over people and sending by passing the body to send(), the contents of the body get appended to the last send. I believe this is essentially the same bug as: https://trac.cakephp.org/ticket/3393 A simple fix is: Index: cake/libs/controller/components/email.php === --- cake/libs/controller/components/email.php (revision 6636) +++ cake/libs/controller/components/email.php (working copy) @@ -289,6 +289,7 @@ */ function send($content = null, $template = null, $layout = null) { $this-subject = $this-__encode($this-subject); + $this-__message = ''; $this-__createHeader(); if ($template) { --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Email::send() in a loop. (1.2.x.x)
On Sun, Apr 6, 2008 at 11:30 AM, CDMoyer [EMAIL PROTECTED] wrote: I ran into this the other day, I think the behavior is a bit unexpected, and probably a bug. If you do something like: $this-Email-subect = 'Hi!'; $this-Email-from = '[EMAIL PROTECTED]'; foreach ($recipient as $r) { $this-Email-to = $r; $this-Email-send(sprintf($body, $r)); } Essentially, setting up the basic email, and then looping over people and sending by passing the body to send(), the contents of the body get appended to the last send. Try $this-Email-reset() after you send the mail. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---