simple mail form asp script


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: simple mail form asp script

Hybrid View

  1. #1
    mark Guest

    simple mail form asp script


    Hi
    Can anyone point me in the direction of setting up a simple asp script to
    email the contents of an html form to me?? I use request and response right?
    But how do I set it up to email the data????

    Any help greatly appreciated...

  2. #2
    Colin Guest

    Re: simple mail form asp script


    <!-- Email Form -->
    <form method="POST" action="thanks.asp">
    <div align="center"><center><table border="0" cellpadding="0">
    <tr>
    <td width="50%" valign="top" align="left"><div align="right"><p><font
    size="1" face="arial">&nbsp;Name:</font>
    </div>
    </td>
    <td width="50%"><input type="text" name="name" size="20"></td>
    </tr>
    <tr>
    <td width="50%" valign="top" align="left"><div align="right"><p><font
    size="1" face="arial">E-Mail:</font></td>
    <td width="50%"><input type="text" name="email" size="20"></td>
    </tr>
    <tr>
    <td width="50%" valign="top" align="right" ><font size="1" face="arial">Message:</font></td>
    <td><textarea rows="5" name="comments" cols="35"></textarea></td>
    </tr>
    </table>
    <!-- End Email Form -->

    <!-- ASP SCRIPT POSTED TO -->
    <!-- Thanks.asp -->
    <%
    sFrom = Request.Form("name") & "<" & Request.Form("email") & ">"
    sTo = "YOUREMAIL@HERE.com"
    sSubject = "SUBJECT LINE HERE"

    sMessage = "Name : " & Request.Form("name") & vbcrlf & vbcrlf _
    & "e-mail : " & Request.Form("email") & vbcrlf & vbcrlf _
    & "Their Message:" & Request.Form("Message")

    Set objNewMail = CreateObject("CDONTS.NewMail")
    objNewMail.Send sFrom, sTo, sSubject, sMessage
    Set objNewMail = Nothing
    %>
    <!-- END ->

    Enjoy!


    In Response to:
    "mark" <mark@spanielbrain.co.uk> wrote:
    >
    >Hi
    >Can anyone point me in the direction of setting up a simple asp script to
    >email the contents of an html form to me?? I use request and response right?
    >But how do I set it up to email the data????
    >
    >Any help greatly appreciated...



  3. #3
    Amber Fontes Guest

    Re: simple mail form asp script


    Check out this link. I think it will answer your question.

    http://www.aspzone.com/articles/john...oSendEmail.asp

    "mark" <mark@spanielbrain.co.uk> wrote:
    >
    >Hi
    >Can anyone point me in the direction of setting up a simple asp script to
    >email the contents of an html form to me?? I use request and response right?
    >But how do I set it up to email the data????
    >
    >Any help greatly appreciated...



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center