|
Posted by Sanders Kaufman on 11/24/07 20:18
"Jesse Burns aka jburns131" <jburns131@jbwebware.com> wrote in message
news:J42dncuPMqdeHNXanZ2dnUVZ_hCdnZ2d@comcast.com...
> It's not located in a loop, so I don't understand why it would send 2
> emails to the reciever?
>
> Any idea's?
I had the *exact* same problem - weird as hell, ain't it?
It didn't happen on all pages, just the one - and even stepping through it
in my code editor showed that I was not calling twice.
But still - two friggin mails.
I think it has something to do with the way the server administrator sets up
the mail system.
In my case, sending to a bad email address didn't just return false - it
crashed PHP.
I called the ISP and they immediately "fixed" it, so that bad sends returned
false.
But then - this problem cropped up.
The way I "solved" (for lack of a better word) was to, in that page, not put
the mail() command in a function.
Instead, I put it inline with an if-then.
So... instead of this.
function fnDo() {
mail();
}
I used this:
function fnDo(){
$bDo = true;
}
if($bDo){
mail();
}
Navigation:
[Reply to this message]
|