Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question about modfying formmail.asp to send data to senders email too

    The script I use for mail processing is formmail.asp
    You can find it at this link:
    http://www.building-envelope.net/formmail.txt
    {Though of course is ends in .asp.}

    In a generic html form, I need whoever fills out the form, to also receive a copy of the data they filled out, as soon as they hit the submit button.
    You can find the generic form at this link:
    http://www.building-envelope.net/form.html

    I know I need to add
    "email address" and make it a required, but how do I get them to receive it, as well as the customer?

    Thanks for your help.

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,071
    Thanks
    4
    Thanked 8 Times in 8 Posts
    This is a very old script and CDONTS is for WIN NT server Change the CDONTS to CDO very easy to do. by replacing what is there with this

    look for the line that says

    mailComp = "CDONTS"

    Replace it with
    mailComp = "CDO"


    look for the lines that say this
    if mailComp = "CDONTS" then
    set mailObj = Server.CreateObject("CDONTS.NewMail")
    mailObj.BodyFormat = 0
    mailObj.MailFormat = 0
    mailObj.From = fromAddr
    mailObj.To = recipients
    mailObj.Subject = subject
    mailObj.Body = body
    mailObj.Send
    end if


    Replace them with this
    if mailComp = "CDO" then
    set mailObj = Server.CreateObject("CDO.Message")
    mailObj.From = fromAddr
    mailObj.To = recipients
    mailObj.Subject = subject
    mailObj.HTMLBody = body
    mailObj.Send
    end if




    Then add these lines in the appropriate places

    CDO
    mailObj.CC = fromAddr

    JMail
    mailObj.RecipientCC fromAddr

    AspMail
    mailObj.CC = fromAddr


  •  

    Posting Permissions

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