open(); //echo("TO $to_mail[$i] FROM $from_mail MSG $msg BODY $body\n"); $sendmail->send($to_mail[$i], $from_mail, trim($msg), $body); $sendmail->close(); } } catch (Exception $e) { //echo 'Caught exception: ', $e->getMessage(), "\n"; $errmsg = 'Caught exception: '.$e->getMessage()."\n"; //fwrite($handle, $ndate."Called ADDR : ".$_SERVER["REMOTE_ADDR"]. // ",Error - ".$errmsg."\r\n"); } if(empty($errmsg)) { //fwrite($handle, $ndate."Called ADDR : ".$_SERVER["REMOTE_ADDR"]."\r\n"); } //fclose($handle); ?>