Results 1 to 2 of 2

Thread: Any One Help The asp code

  1. #1
    Join Date
    Nov 2006
    Posts
    20
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Unhappy Any One Help The asp code

    hi Friends
    i need email this page(tell to friend) asp code Bez i no for normal feed back form code but idont how to get send the url plz help me

    this is my html form
    --------------------------------------------------------------------
    <form name="contact" method="POST" action="sendurl.asp" onSubmit="return valider()">
    <table width="500" border="0" cellspacing="2" cellpadding="0">
    <tr>
    <td width="214" align="right">
    Your Name: </td>
    <td ><input type="text" name="visitor" size="25"></td>
    </tr>
    <tr>
    <td align="right">Your Email:</td>
    <td><input type="text" name="visitormail" size="25"></td>
    </tr>
    <tr>
    <td align="right">Friend's Name: </td>
    <td><input type="text" name="friend" size="25"></td>
    </tr>
    <tr>
    <td align="right">Friend's Email: </td>
    <td><input type="text" name="friendmail" size="25"></td>
    </tr>
    <tr>
    <td align="right">Your Message:<br> <br> </td>
    <td><textarea name=notes rows=4 cols=27></textarea></td>
    </tr>
    <tr align="center">
    <td height="30" colspan="2">
    <input name="Submit" type="submit" value="Send URL">
    </td>
    </tr>
    </table>
    </form>
    ----------------------------------------------------------------------

  2. #2
    Join Date
    Dec 2006
    Location
    Under a Bridge
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hello,
    add this code to the sendurl.asp page

    Code:
    <%
    ' Email Form '
    
    Dim iMsg,tVisitor, tvisitoremail, tfriend, tfriendmail, tnotes, thedate, thetime
    Set iMsg = CreateObject("CDO.Message")
    Dim iConf
    Set iConf = CreateObject("CDO.Configuration")
    
    tVisitor = request.Form("visitor")
    tvisitoremail = request.Form("visitormail")
    tfriend = request.Form("friend")
    tfriendmail = request.Form("friendmail")
    tnotes = request.Form("notes")
    thedate = date()
    thetime = time()
    
    Dim Flds
    Set Flds = iConf.Fields
    Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
    Flds( _
     "http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") _
      = "c:\inetpub\mailroot\pickup"
    Flds.Update
    
    Set iMsg.Configuration = iConf
    
    'SEND EMAIL TO
    iMsg.To = tfriendmail  
    ''''''''''''''''''''''''''''''''''''''''
    'SEND EMAIL FROM                   
    iMsg.From = "email@domain.com"    
    ''''''''''''''''''''''''''''''''''''''''
    'MESSAGE SUBJECT        
    iMsg.Subject = "Message Subject"
    ''''''''''''''''''''''''''''''''''''''''
    iMsg.htmlBody = "<strong> Visitor: </strong>" & Trim(tVisitor) & vbCrLf _
        & "<br><strong>Visitor's Email: </strong>" & Trim(tvisitoremail) & vbCrLf _
        & "<br><strong>Friends Name: </strong>" & Trim(tfreind) & vbCrLf _
    	& "<br><strong>Friends Email: </strong>" & Trim(tfreindmail) & vbCrLf _
        & "<br><strong>Message: </strong>" & Trim(tNotes) & vbCrLf _
    	& "<br><strong>Time: </strong>" & Trim(thetime) & vbCrLf _
    	& "<br><strong>Date: </strong>" & Trim(theDate) & vbCrLf
    iMsg.Send
    
    response.redirect("otherpage.asp")
    
    %>
    let me know how it went

    Cheers

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •