Gossamer Forum
Home : Products : DBMan : Installation :

E-Mail Notification of Deletions

Quote Reply
E-Mail Notification of Deletions
Boo,

Just tried to add another thread to this topic which somehow brought the folder to the top without my new message.

Anyway, got the add and mod notifies going great, adjusting the cgi file.

Adjusted the html file and got six e-mails, only one which contained the Key (record number)

Granted I did add and delete this sample record in one session but so might other clients.

IN: sub html_delete_success

</body>
</html>
|;
}

{
open (MAIL, "|/usr/lib/sendmail -t") or &cgierr("Can't open sendmail:
$!");
print MAIL "To: hcnet\@aol.com\n";
print MAIL "From: hcnet\@aol.com\n";
print MAIL "Subject: HCNet Registry Record Deletion\n\n";
print MAIL " \n";
print MAIL "This record was deleted: $message\n";
print MAIL " \n";
print MAIL "Thank You\n";
print MAIL " \n";

close MAIL;
}

sub html_delete_failure {
# --------------------------------------------------------
....

sos


Quote Reply
Re: E-Mail Notification of Deletions In reply to
I don't think that adding and deleting in one session should make any difference.

When you say you got 6 emails, I'm not sure what you mean. Are you saying that when you deleted one record you got 6 emails, with 5 of them having an empty $message?

I see a little problem with your structure, though. Your mail routine is outside of sub html_delete_success. You need to move it a bit:

</body>
</html>
|;

open (MAIL, "|/usr/lib/sendmail -t") or &cgierr("Can't open sendmail: $!");
print MAIL "To: hcnet\@aol.com\n";
print MAIL "From: hcnet\@aol.com\n";
print MAIL "Subject: HCNet Registry Record Deletion\n\n";

[etc]

close MAIL;
}

This should help.

------------------
JPD


Quote Reply
Re: E-Mail Notification of Deletions In reply to
You're right on the money, JPDeni. As always. Thanks for your _patience_ with some of us beginners. Truly, you are a credit to your gender. :-D

I'll sleep so much better now that no data will be lost, cause copies of each transaction are e-mailed to to an external source.

May a 7 year curse follow those who don't pay the shareware fee for this magnificient product and support system.

Carolynn

Quote Reply
Re: E-Mail Notification of Deletions In reply to
Thank you, Carolynn, for your nice words. (BTW, my first name is Carol! Smile JPDeni is a nickname from high school many, many moons ago.)

It wasn't that long ago that I was a beginner, so I know what it's like. And often we get so caught up in the "meat" of what we're doing that we forget some of the little things -- important little things like brackets and semi-colons and quotation marks. It really takes another set of eyes to see that kind of mistake, from someone who is a little more distant from the main subject.

I especially liked your comment:

Quote:
Truly, you are a credit to your gender. :-D

I'm often amused at the shocked reactions from folks when they realize I'm a woman. Smile (Which is one reason I chose to use my nickname. I was able to establish myself here before I told anyone my gender. I've found that often in the past I was dismissed because "girls don't do programming." Maybe we've taught some people who thought such a thing that they might have been mistaken! Smile )

I am very pleased that I've been able to help you sleep at night. If you notice some of the times that I've posted here, I am often plagued by insomnia. (My time zone is the same as the times listed on the forum.) As I am surfing the web or customizing another version of DBMan at 3am, I'll think of you, dreaming of nice things in Tennessee. Smile


------------------
JPD