Results 1 to 2 of 2

Thread: Email notification before record delete

  1. #1
    Join Date
    Jul 2006
    Posts
    1
    Thanks
    0
    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?

    Thanks!

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,625
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Thumbs up

    Hi,

    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= "somebody@nowhere.com"
    cdontsObj.To= "nobody@nowhere.com"
    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

    cdontsObj.Body=mailBody
    cdontsObj.Send
    set cdontsObj=nothing


    %>

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

    regards

    Code Exploiter

Bookmarks

Posting Permissions

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