Since I brought this up, I'll comment a bit more.
Basically ns_sendmail creates a socket connection to the smtphost and smtp port (from ns/parameters). It then Creates the message (From, To, BCC, Subject, Body, etc)
and does a minimual smtp transations.
Basically it only returns an error when there is a SMTP problem OR a network problem. Since getting a 5xx code during and SMTP transaction is not an error (and Relay Denied, etc return 5xx codes). It also sends to all recipents all at once. This is nice for speed but makes it difficult to parse for errors.
The acs-mail-lite error that Lars was indicating really is not an error but something that needs to be looked into.
For the uptime server, I redid the mailing portions. ns_sendamil creates a message and sends it through /usr/sbin/sendmail -t -f$from. It checks that return code of sendmail and reports the error.
This is something should be intergrated into OpenACS. It will slow things down a bit (each mail is send one by one).
acs-mail-lite, notifications, acs-mail, acs-messages (we really need to cut down on these) would all have to be looked to make a change.
I haven't look at this in a bit, but I know for acs-mail-lite a replacement ns_sendmail that returned an error code would not effect its operation and correct the error Lars is having. Anybody know about the others?
When I get home tonite I'll post my ns_sendmail replacement and trying moving it to a OpenACS installation.
Or would it be better to look at replacing all the mail/messaging packages with completely new package that handle everything?
Mat