Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Send Mail based on Form Value - Only Once!

Reply
Thread Tools

Send Mail based on Form Value - Only Once!

 
 
Kermit Piper
Guest
Posts: n/a
 
      10-05-2005
Hello,
I've been racking my brains over this one. I have a Classic ASP edit
form with many fields, one of them a Status drop-down. If the Status
(option value) has been changed to "Pending" for instance, I do a
objMail.send, otherwise it doesn't send. No problem, but how can I
prevent the mail from sending AGAIN if a user goes back to the page and
updates another field, or even just refreshes the page? If it helps, I
am updating a SQL Server database. Any help sure would be appreciated.
Thanks in advance, KP

 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      10-05-2005
Not sure what exactly it is, but you could just keep an indicator (either a
boolean or perhaps a date) that allows to know if a mail was sent for this
item...

--

Patrice

"Kermit Piper" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed) oups.com...
> Hello,
> I've been racking my brains over this one. I have a Classic ASP edit
> form with many fields, one of them a Status drop-down. If the Status
> (option value) has been changed to "Pending" for instance, I do a
> objMail.send, otherwise it doesn't send. No problem, but how can I
> prevent the mail from sending AGAIN if a user goes back to the page and
> updates another field, or even just refreshes the page? If it helps, I
> am updating a SQL Server database. Any help sure would be appreciated.
> Thanks in advance, KP
>



 
Reply With Quote
 
 
 
 
Chris Hohmann
Guest
Posts: n/a
 
      10-05-2005
"Kermit Piper" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello,
> I've been racking my brains over this one. I have a Classic ASP edit
> form with many fields, one of them a Status drop-down. If the Status
> (option value) has been changed to "Pending" for instance, I do a
> objMail.send, otherwise it doesn't send. No problem, but how can I
> prevent the mail from sending AGAIN if a user goes back to the page and
> updates another field, or even just refreshes the page? If it helps, I
> am updating a SQL Server database. Any help sure would be appreciated.
> Thanks in advance, KP
>

Store old_status in a hidden form field. Compare that to the new_status
value when the form is submitted. If they're different, email.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic form field update based on previous form value selection Brett_A ASP General 8 04-19-2008 11:13 AM
Socket send functions only allow you to send strings? Ryan Parmeter Ruby 4 09-05-2007 03:29 AM
Loop Form - extract display 'value' as well as form value? ASP General 2 02-20-2006 09:36 PM
Mail insertion hack on Send Mail form nauticalmac ASP General 0 12-23-2005 12:13 PM
Mail.SmtpMail.Send won't send to one of my addresses Nathan Sokalski ASP .Net 3 11-23-2005 09:25 PM



Advertisments