SPUG: Error message

Don Shanks me at donshanks.com
Wed May 15 12:58:27 CDT 2002


Another tact may be to use a unique number ( I use the UNIQUE_ID
generated by Apache ) in a file touch, and pass that number to the cgi,
have the cgi remove the file then send the email. If the file doesn't
exist, error out.

-Don

-----Original Message-----
From: owner-spug-list at pm.org [mailto:owner-spug-list at pm.org] On Behalf
Of Chris Wilkes
Sent: Wednesday, 15 May, 2002 09:37
To: spug-list at pm.org
Subject: Re: SPUG: Error message


On Wed, May 15, 2002 at 02:50:04PM +0000, Andre McDowall wrote:
> Thanks for responding to my request Don. I would like to get rid of
> the HTTP_REFERER. However, when I do, the script continues to send 
> emails to the receiver and continues to do so until the sender hits 
> stop on their browser. How can I get rid of the HTTP_REFERER and still

> have the script perform as intended (i.e. send only one email?) 
> Thanks!

This is odd, are the clients hitting refresh a bunch of times?

To correct this you could write out the person's email to a file and
check that before sending out an email to see if they've recently
received one.  Watch out for the multiple apache processes writting to
this file as there might be some concurrency issues.

How about putting this email request into a database and having a cron
job go through this database / file every minute or so and then emailing
out, carefully not sending multiple emails to the same person.

Chris

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your
Email-address  For daily traffic, use spug-list for LIST ;  for weekly,
spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list