in reply to Re: Re: SendMail works 99% of the time
in thread SendMail works 99% of the time

After you call the sendmail binary, you can interrogate the $? variable for the exit code of sendmail. I am guessing that '0' means success, although the sendmail man page does not seem to list exit codes.

After your open using pipes or system call, or whatever you use to invoke sendmail:

# -- insert sendmail invocation here. # eg. open(SENDMAIL, "|/usr/bin/sendmail -t") $exit_value = $? >> 8; $signal_num = $? & 127; $dumped_code = $? & 128;
(from the Cookbook)

Anyway, how do you know that bounces are not the issue? Is the user who is sending the messages getting none at all? Maybe start off by checking the return values as above, but if sendmail is being run successfully and you are missing out on mails, I would look for bounce messages.

--
Ash OS durbatulk, ash OS gimbatul,
Ash OS thrakatulk, agh burzum-ishi krimpatul!
Uzg-Microsoft-ishi amal fauthut burguuli.

Replies are listed 'Best First'.
Re: Re: Re: Re: SendMail works 99% of the time
by Elliott (Pilgrim) on May 22, 2002 at 13:49 UTC
    --how do you know that bounces are not the issue?-- Because I copy the emails to myself - and when the client doesn't receive them, netiher do I. Thank you for the exit codes. I'll do some experimenting with those.