Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


ASP forms to email

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,227
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> ASP forms to email
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 ASP forms to email - 6/29/2001 7:55:41 AM   
  ericgibson

 

Posts: 1
Score: 0
Joined: 6/29/2001
From:
Status: offline
I am fairly new to ASP. I can create a form that will submit info to my ASP script then to a database, but what I really need to do is submit the form information to an email address. How is this done?
 
 
Post #: 1
 
 Re: ASP forms to email - 6/29/2001 8:49:41 AM   
  adminkoe

 

Posts: 117
Score: 0
Joined: 12/23/2000
From:
Status: offline
Eric,

This is a sample code for sending e-mail using ASP


<%
On Error Resume Next
'------------------Modify this section to customize your message
strMsg="Dear " & request.form("Yourfriendname") & "," & vbcrlf & vbcrlf
strMsg=strMsg & request.form("yourname")
strMsg=strMsg & " wants you to check out VisualBasicScript.Com's page at" & vbcrlf & vbcrlf
strMsg=strMsg & "http://www.VisualBasicScript.Com" & vbcrlf & vbcrlf
strMsg=strMsg & request.form("yourname") & " also says" & vbcrlf & vbcrlf
strMsg=strMsg & request.form("message") & vbcrlf & vbcrlf
strMsg=strMsg & "If you do not know " & request.form("yourname")
strMsg=strMsg & ", please ignore this message or report it to vbscript@mm-inet.com"
strMsg=strMsg & vbcrlf & vbcrlf
strMsg=strMsg & "Warmest Regards," & vbcrlf
strMsg=strMsg & "VisualBasicScript.Com Staff" & vbcrlf
strMsg=Cstr(strMsg)

Set objMail = CreateObject("CDONTS.NewMail")
objMail.From= request.form("youremail") 'Specify sender's address
objMail.To=request.form("Yourfriendemail")
objMail.Subject="VisualBasicScript.Com Recommendation" ' Subject of the message
objMail.Body=strMsg
objMail.Send
Set objMail = nothing

%>


Regards,
Andi Zain

(in reply to ericgibson)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> ASP forms to email Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts