On 11 May 98 at 19:49, Jack Killpatrick wrote:
> I have a database that has records that have an index, such as:
>
> index record
> 1001 blah blah
> 1002 blah duh
> 1003 balala
>
> These records come from submissions made by people on my site: When
> a person clicks "submit" their record is saved, then an email is
> sent to me using sendmail.
>
> I would like to have a way to check the emails that have been sent
> via sendmail against the ones in the database so I can spot any
> errors that may have occurred in the sendmail process. For example,
> let's say sendmail fails for some reason (some loose and crazy
> process that stymies the system so that sendmail is rendered
> useless, while perl and msql continue to function). I'd like to
> compare a record of sent mail to the records in the database, using
> the index as a key. Then I could spot any submissions that were not
> sent out by sendmail.
>
> I'm not familiar with the interworkings of sendmail and the files it
> keeps. If anyone out there is, and would like to offer ideas, I'd be
> grateful. At the very least, can anyone say whether it can or can't
> be done with Perl: I'm not a C coder.
Umm.. not sure if I really understand but that hasn't stopped me
before.
When you open sendmail do you not do this:
open sendmail || do something else
I often have that something else just email me a message that what I
wanted couldn't occurr. Or I stop the whole program and log the
error and give the user some meaningful file.
But I think you are saying .."if I open sendmail and it opens but
before email can be sent it crashes ....". I don't know what will
happen in this case. My instinct says that your script will keep
running.
If really critical you could send a copy of the email to another
program that will take the email and then update a file to indicate
it was received. The options are endless here. I think this is
really the only way to be sure that it was at least emailed.
open sendmail
send to $user,$the_program
if it gets to the $the_program then you can be assured (?) that it
was sent to $user and it didn't die.
Here is an example of sending an email to a program:
Send email to
[EMAIL PROTECTED]
and then view this file:
http://www.rede.com/uce.html
it is a poorly parsed version of the email you sent.
Peter
_________________________________________________________
Peter J. Schoenster [EMAIL PROTECTED]
Exercise Your Brain..Read a Book http://www.rede.com/
Free CGI Scripts and Applications
http://www.rede.com/samples/index.html
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------