You'll have to make sure that your headers include a reply-to email address. Also set up with your server administrator that the outgoing emails from your site have a correct sender. The mail function's return value only tells you that it made it to the outgoing mail server. That the server actually sends it is completely unverified. You could try setting up an IMAP function that logs onto the mail server and collects the returned mails for you, automatically deleting them from your database, but I wouldn't have that run for at least 24 hours after the mail is sent, to make certain to catch the returns.
Mike "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > what's the best way to log the bad email address' from a mail() loop? > > my guess is: > > <? > $log = ''; > $to = '[EMAIL PROTECTED]'; > $subj = 'foo'; > $msg = 'blah'; > $head = 'From: [EMAIL PROTECTED]'; > > if(!mail($to,$sub,$msg,$head)) > { > $log .= "{$to}\n"; > } > > // write $log to screen, or to a file > ?> > > But I'm interested in people's experience with what mail() returns: > From the manual: > "mail() returns TRUE if the mail was successfully accepted for delivery, > FALSE otherwise." > > Is the definition of "accepted for delivery" dependent on each server, or is > there are general definition of what it means? > > ie, when am I likely to get a returned value of FALSE? > > > Also, I'm on a shared server. Is there any way I can specify the email > address that bounces return to with either an ini_set or with an email > header? > > Because my assumption is that there will be email address' that return TRUE, > but later bounce. > > Can't see what it might be in the php.ini file though. > > > Thanks in advance, > > Justin French > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php