ASP forms to email

Author Message
ericgibson

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 6/29/2001
  • Location:
  • Status: offline
ASP forms to email Friday, June 29, 2001 8:55 AM (permalink)
0
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?
 
#1
    adminkoe

    • Total Posts : 114
    • Scores: 0
    • Reward points : 0
    • Joined: 12/23/2000
    • Location:
    • Status: offline
    Re: ASP forms to email Friday, June 29, 2001 9:49 AM (permalink)
    0
    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
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • 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
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9