
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
The Infinite Autoresponder LoopBy Will Bontrager A user of the free Master Autoresponder (no longer available) asked what could be done to prevent an infinite loop when someone subscribes an autoresponder address to the autoresponder. And, wouldn't you know it, two days after receiving that email the same thing happens to our installation of Master Autoresponder Bank at the Web Developer's Article Bank. The autoresponder in question sent the "we received your message and will get right back to you" type of email. And the email that triggered the autoresponder was not quoted in the response. Let me do a bit of a rant here. We all go through a newbie stage, so I'm not ranting about someone sticking an autoresponder on their main email address. However, newbie or not, it's rude not to quote the email that triggered the response, just like it's rude to answer an email without quoting relevant portions of the one being answered. Just because they have a low volume of email (or they would not have an autoresponder on their main email address, believe you me) does not mean everybody is like that. Some people have a very high volume, and might answer dozens of emails in any one hour. Not quoting requires the recipient to remember each email sent out and the addresses they were sent to, or to take the time to try to match the address the email was received from with the addresses in the "sent" folder. Always quote, please. It's not good to be remembered as the one who demands extra work gratuitously. End of rant. I suppose that rant should have been a post by itself. But it ties in, here. When email is quoted in the auto-response message, loop control can be obtained by looking for a unique series of characters in the quoted header or email message. Message ID numbers are often used for infinite loop prevention. Without the email being quoted, a different system must be used to prevent loop control. I thought about scanning incoming email for phrases such as "thank you for your email" and "this is an automated response." But the more I thought about it, the less I liked that idea. Every written language would need to be coded for. And there could be a seemingly infinite way of phrasing "got your email" type of messages. So I dropped that. What I decided to do, instead, is develop code to limit the number of responses that may be sent to any one email address during a 60 minute period. It would break an infinite loop when the limit was exceeded. Both Master Autoresponder Bank (free upgrade) and Master Autoresponder (free all the way) now have that code. Here is transportable code based on what I used to upgrade the two titles. Put the subroutine into your script, then call it with whatever control item you wish to use. For an autoresponder, the control item would be the email address being responded to. The subroutine limits the count to 5 in any 60 minute period. You can change those numbers at the lines so commented. The subroutine returns the number 1 if the count has not exceeded the limit. Otherwise, it returns null. The database should not grow very large because records older than the 60 minute monitoring period are purged. January 22, 2006 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|