Greetings and Hello, I am converting a script to use SMTP if php mail() is not available for the users of this script. I have all the active calls working so that if my smtp flag is set it automatically switches to smtp and sends the message with the appropriate headers etc. but part of the script is run by a cron job and I see a php mail call but don't quite understand the syntax. Anyone care to take a guess at translating what it does?
It is part of a while loop and I think its combining two conditions into one statement but would like confirmation. here is the code fragment: if ( !mail( $row['Email'], $row[Subj], $row[Body], "From: $site[email_notify]", "-f$site[email_notify]") ) ++$err; I thinks this is the equivalent of: if ( !mail( $row['Email'], $row[Subj], $row[Body], "From: $site[email_notify]", "-f$site[email_notify]") ) { ++$err; //update the error queue } else { mail( $row['Email'], $row[Subj], $row[Body], "From: $site[email_notify]", "-f$site[email_notify]"); } Has anyone seen or used this technique before? This is the first time I have seen it used, though this script has a lot of short cuts that make the code difficult to debug sometimes, like this one. Thanks in advance for your comments, -- Best regards, mikesz mailto:[EMAIL PROTECTED] _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php