Results 1 to 2 of 2

Thread: Email notification before record delete

  1. #1
    Join Date
    Jul 2006
    Thanked 0 Times in 0 Posts

    Unhappy Email notification before record delete

    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?


  2. #2
    Join Date
    Sep 2005
    Thanked 107 Times in 107 Posts

    Thumbs up


    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

    Dim cdontsObj
    Dim mailBody

    Set cdontsObj = CreateObject("CDONTS.NewMail")
    cdontsObj.From= ""
    cdontsObj.To= ""
    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

    set cdontsObj=nothing


    Hope this will help you to solve your problem. Please let me know if you face any problem with this method


    Code Exploiter


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts