sending form data via email

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default sending form data via email

    Made a form with two fields and a submit button
    field name is "subline"
    textarea name is "bodynote"
    But it never sends..any suggestions?? I'm stumped. Do not get any errors,
    redirects me to my done page..just never get the mail????


    <%
    If (cStr(Request("Submit")) <> "") Then

    Dim usxCDO
    Set usxCDO = Server.CreateObject("CDONTS.NewMail")
    usxCDO.From = "webmaster@123456.com" <-valid email
    usxCDO.To = rsmail.Fields.Item("ContactEmail").Value <- this is coming for
    the DB
    usxCDO.Subject = cStr(Request("subline"))
    usxCDO.Body = cStr(Request("bodynote"))
    usxCDO.Send
    Set usxCDO = Nothing
    Response.Redirect "/done.asp"
    End If
    %>


    AS Dawg Guest

  2. Similar Questions and Discussions

    1. Sending radio button form data to PHP email generator
      I've bene struggling with this for 2 days! I've got a form with 5 radio buttons and two text forms. My submit button has this as: on (release)...
    2. Sending Email thru user form
      Hello All, I what to know what is needed to be able to send email thru my user fom. Listed below are information that is important to my case....
    3. Sending Secure Data (Credit Card info) through PDF email attachments?
      Does anyone know if data input INTO a pdf form (with editable fields) can be sent via email (as an attachment) SECURELY? Is this info out there for...
    4. sending form data as email using SMTP server ???
      How can I take my form data and send it as an email using my SMTP server located @ my ISP using PHP ? my form has several fields: TO: this is...
    5. Sending a form by email
      What is the easiest way to send a form by email? I have created the forms but fail to understand how they can be sent to my email by persons filling...
  3. #2

    Default Re: sending form data via email

    Are you sure you have a CDONTS mail service on the server machine? If it's Win
    XP, it's most likely CDOSYS, which has a different syntax, but even with the
    correct service type, there may be some additional configuration required here
    - quite often the mail server will require the mailbox owner's user info
    including password - who owns the email address that replaces
    [email]webmaster@123456.com[/email]? Bill

    Billium99 Guest

  4. #3

    Default Re: sending form data via email

    It works fine with other extensions same type works great,same server(CDONTS
    installed), I hand coded a the email for the "To" to be pulled from the DB
    and I set the recordset correctly. When it pulls my email (first record) it
    works but not anyone else's. (have several bogus members all have good email
    addresses) got me scratching my head!!!

    I can only guess it's a coding issue I am overlooking :(


    "Billium99" <webforumsuser@macromedia.com> wrote in message
    news:d2rsm7$jot$1@forums.macromedia.com...
    > Are you sure you have a CDONTS mail service on the server machine? If it's
    > Win
    > XP, it's most likely CDOSYS, which has a different syntax, but even with
    > the
    > correct service type, there may be some additional configuration required
    > here
    > - quite often the mail server will require the mailbox owner's user info
    > including password - who owns the email address that replaces
    > [email]webmaster@123456.com[/email]? Bill
    >

    AS Dawg Guest

  5. #4

    Default Re: sending form data via email

    Hi!
    Copy this put it in a new page upload it to your sever and see if it works
    then you can see what you need to do.
    <%
    If Request.Form.Count = 0 Then
    %> <H1>CDONTS Test Submission Form</H1>
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td>To:&nbsp;</td>
    <td>
    <input type="TEXT" name="TO" size="30">
    </td>
    </tr>
    <tr>
    <td>From:&nbsp;</td>
    <td>
    <input type="TEXT" name="FROM" size="30" value="user@guesswho.net">
    </td>
    </tr>
    <tr>
    <td>Subject:&nbsp;</td>
    <td>
    <input type="TEXT" name="SUBJECT" size="40">
    </td>
    </tr>
    <tr>
    <td valign="TOP">Body:&nbsp;</td>
    <td>
    <textarea name="BODY" rows="5" cols="40"></textarea>
    </td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>
    <input type="SUBMIT" value="Send Message" name="SUBMIT">
    &nbsp;
    </table>
    <%
    Else
    Dim objCDO
    On Error Resume Next
    Set objCDO = Server.CreateObject("CDONTS.NewMail")
    If Err.Number = 0 Then
    objCDO.To = Request.Form("TO")
    objCDO.From = Request.Form("FROM")
    objCDO.Subject = Request.Form("SUBJECT")
    objCDO.Body = Request.Form("BODY")
    objCDO.AttachFile( Server.MapPath(".\TestFile.txt") )
    objCDO.Send
    Set objCDO = Nothing
    %><H1>Message Sent</H1>
    <B>To: </B> <% = Server.HTMLEncode(Request.Form("TO")) %><BR>
    <B>From: </B> <% = Server.HTMLEncode(Request.Form("FROM")) %><BR>
    <B>Subject: </B> <% = Server.HTMLEncode(Request.Form("SUBJECT"))
    %><BR>
    <HR> <% = Server.HTMLEncode(Request.Form("BODY")) %><HR><BR>
    <A HREF="XcCDONTS.asp">Send another message</A><P>
    <%
    Else
    Response.Write "<H1>Attention</H1>The CDONTS object could not be
    created."
    End If
    End If
    %>
    <FONT SIZE="1"><EM>Transmitted: <% = Now %><BR></EM></FONT>
    DAve

    "AS Dawg" <asdawgNOTHERE@tampabay.rr.com> wrote in message
    news:d2rkp7$6vt$1@forums.macromedia.com...
    > Made a form with two fields and a submit button
    > field name is "subline"
    > textarea name is "bodynote"
    > But it never sends..any suggestions?? I'm stumped. Do not get any errors,
    > redirects me to my done page..just never get the mail????
    >
    >
    > <%
    > If (cStr(Request("Submit")) <> "") Then
    >
    > Dim usxCDO
    > Set usxCDO = Server.CreateObject("CDONTS.NewMail")
    > usxCDO.From = "webmaster@123456.com" <-valid email
    > usxCDO.To = rsmail.Fields.Item("ContactEmail").Value <- this is coming
    for
    > the DB
    > usxCDO.Subject = cStr(Request("subline"))
    > usxCDO.Body = cStr(Request("bodynote"))
    > usxCDO.Send
    > Set usxCDO = Nothing
    > Response.Redirect "/done.asp"
    > End If
    > %>
    >
    >

    Baxter Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139