On 08/11/2004 9:28 AM, Kim Steinhaug <[EMAIL PROTECTED]> wrote: > Thanks for your reply, it all seems logical when you think of it, > still I also think it sounds logical without the extra ELSE statement > since the function has to executed for the first IF to do the comparison, > meaning that the email should be sendt in the first place. (If it didnt > how could it state FALSE or TRUE, unless PHP only simulates the > function if it falls outside the initial IF statement) > > However, no reason to argue the obvious, :D > > On the other hand, this would also mean that the exmaples from > phpmailers homepage are wrong : > > [ SNIP FROM http://phpmailer.sourceforge.net/extending.html ] > $mail->Body = $body; > $mail->AltBody = $text_body; > $mail->AddAddress($row["email"], $row["full_name"]); > $mail->AddStringAttachment($row["photo"], "YourPhoto.jpg"); > > if(!$mail->Send()) > echo "There has been a mail error sending to " . $row["email"] . > "<br>"; > [ /SNIP] > > This is probably why I in the first place removed the extra ELSE statement, > since I didnt see any reason for it. But in future Ill always include it it > seems, :D
I've been using PHPMailer like this for years: if (!$mail->Send()) { } You shouldn't need an extra else { }, Jay's reasoning nonetheless. That being said, I don't know why it isn't working for you. Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php