View Full Version : Email notification before record delete
07-11-2006, 10:23 PM
I seem to be having much trouble trying to get my page to send the name of the unsubscriber via email when the record is deleted from my database. I am able to send a notification email ok but am unable to pass the name variable to be included in the email. Can anyone help me with this one?
08-02-2006, 12:34 PM
You haven't furnished any details about the coding method you used while unsubscribing a user. My assumption is something like the following
1. The person wish to unsubscribe will enter their email ID into a text box and press a submit button to unsubscribe themselves from some group
2. In your main ASP script that removes the user data from the database you insert ASP code through which you are selecting the user record based on his/her email. I am expecting unique emails for each user account.
3. Now you will get the username or first name or last name or any other kind of details from that record extract the necessary information from that record and store that in a local variable.
4. Develop a email sending ASP script using CDONTS component that can be achieved, have a look at the following code
Set cdontsObj = CreateObject("CDONTS.NewMail")
cdontsObj.Subject="This is a Test"
' nameVar is the local variable in which you stored the name of the user that you got when you done the ASP script like I mentioned in my above step.
mailBody = "Thank you for using our service" & nameVar & vbCrLf
mailBody =mailBody & "Hope you had a nice time with us" & vbCrLf
Hope this will help you to solve your problem. Please let me know if you face any problem with this method
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.