On Jan 29, 11:29 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jan 29, 9:24 am, phantz <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey,
>
> > I added email notification into an app I was building and found that
> > every time I sent an email using phps mail() it would send six times.
>
> > So I created a test function to see what was going on.
>
> > function emailtest()
> > {
> > $address = "[EMAIL PROTECTED]";
> > $from = "[EMAIL PROTECTED]";
> > $subject = "test".rand(1,10000);
> > $message = "test email";
>
> > mail($address,$subject,$message,"From: ".$from);
> > }
>
> > I am calling this function from a url http://domain/controller/function
>
> > When I call that function it sends me six emails. It must be running
> > the function six times because the random number in the subject is
> > always different.
>
> > Has any one seen this before or have any idea what might be causing
> > it?
>
> You have 5 missing js/image/css files, or are otherwise requesting the
> same url (possibly with something appended to it) 6 times.
>
> hth,
>
> AD
PS GET should be safe, it shouldn't do anything, using a POST request
would solve part of your problem and give you a more robust design -
have a look at how to use the requestHandler requirePost so that
things don't happen if you /just/ visit the right url. also maybe
interesting: http://www.ad7six.com/MiBlog/capabilityBasedSecurity
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---