|
-
Feb 8th, 2001, 05:58 AM
#1
Thread Starter
Addicted Member
Can you use ASP's to send like an email response from a web page?
Por ejemplo:
Fill in a form on a web site and then email it to a pop account?
Cheers n beers
Skeen
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Feb 8th, 2001, 09:49 AM
#2
Thread Starter
Addicted Member
If anyones interested, I think this should do the trick:
<% @Language = "VBSCRIPT" %>
<% Option Explicit %>
<% Response.Buffer = True %>
<% Response.expires = 0%>
<%
SUB sendMail( fromWho, toWho, Subject, Body)
Dim MyMail
Set MyMail = Server.CreateObject("CDONTS.Newmail")
MyMail.From = FromWho
MyMail.To = ToWho
MyMail.Subject = Subject
MyMail.Body = Body
MyMail.Send
Set MyMail = Nothing
End Sub
Dim fromWho
Dim toWho
Dim Subject
Dim Body
fromWho = TRIM( Request.Form( "FromWho"))
toWho = TRIM( Request.Form( "ToWho"))
Subject = TRIM( Request.Form( "Subject"))
Body = TRIM( Request.Form( "Body"))
If toWho <> "" Then
sendMail fromWho, toWho, Subject, Body
End If
%>
<HTML>
<HEAD><TITLE>Mail Poster</TITLE></HEAD>
<BODY>
<FORM action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
To : <INPUT NAME="ToWho" TYPE="text" SIZE=40><BR>
>From : <INPUT NAME="FromWho" TYPE="text" SIZE=40><BR>
SUBJECT : <INPUT NAME="Subject" TYPE="text" SIZE=40><BR>
<TEXTAREA NAME="Body" COLS=40 ROWS=5></TEXTAREA><BR>
<INPUT TYPE="submit" VALUE="SendMail"
</FORM>
</BODY>
</HTML>
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Feb 8th, 2001, 12:09 PM
#3
Lively Member
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
|
Click Here to Expand Forum to Full Width
|