-
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...
-
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"> 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...
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks