Ask a Question related to ASP, Design and Development.
-
Sara22 #21
CDONTS
I'm trying to setup mail-form to send the customer's feed back from my site
to be forwrded to my email address, the script is working ok, but when I
receive the email, the data fields are blank, below are both codes,
----------------------------------Form-----(Input.html)-----------------------------------
<body bgcolor="#000000" text="#FFFFFF">
<p align="center"><font face="Arial"><b>Peabody's</b> </font><font
face="Arial">may
have an opportunity for you. Submit your information below, If we have a
position available we will contact you.</font></p>
<p></p>
<table width="80%" border="1" cellspacing="8" cellpadding="8"
background="jobsback.gif">
<tr>
<td><font face="Arial" color="#FFFF00">Please submit the info
below:</font>
<form id="employment" action="thanks.asp" method="get" name="employment">
<input type="hidden" name="email " value="pbodyvb@cox.net"><input
type="hidden" name="subject" value="jobs"><input type="hidden" name="redir"
value="thanks.htm">
<p>Name: <input type="text" name="textfieldName"
size="24"></p>
<p>Phone Number : <input type="text" name="textfieldName" size="24"></p>
<p>E-Mail: <input type="text" name="textfieldName"
size="24"></p>
<p>Desired Position <input type="text" name="textfieldName"
size="45"></p>
<p><input type="submit" name="submitButtonName"> <input
type="reset"></p>
</form>
<p></p>
</td>
</tr>
</table>
<p></p>
</body>
----------------------------------------------------------------------------------------------------------------------------------------
Action------( output.asp)---------------------------
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Thanks for your submission</title>
</head>
<body topmargin="30" BGCOLOR="#000000">
<p> <img border="0" src="peabodyslogoglow2.gif" align="middle" width="268"
height="132">
<b><font face="Arial" color="#FF3300">Thanks for your submission.
</font></b></p>
<p align="center">
</p>
<!-- Output - Cdonts send script -->
<%
Response.Buffer = True
Dim strBody
Dim objCDOMail
Dim strMyEmailAddress
Dim strCCEmailAddress
Dim strBCCEmailAddress
Dim strReturnEmailAddress
strMyEmailAddress = "pbodyvb@cox.net"
strCCEmailAddress = "sawsan22@msn.com"
strBCCEmailAddress = "sawsan4ayad@msn.com"
strReturnEmailAddress = Request.Form("email")
strBody = "<h2>E-mail sent from Contact Us Form on Web Site</h2>"
strBody = strBody & "<br><b>Name: </b>" & Request.Form("firstName") & " " &
Request.Form("lastName")
strBody = strBody & "<br><br><b>Address: -</b>"
If (Request.Form("domain")) > "" Then
strBody = strBody & "<br> " & Request.Form("domain")
End If
If (Request.Form("account_number")) > "" Then
strBody = strBody & "<br> " & Request.Form("account_number")
End If
strBody = strBody & "<br><br><b>Telephone: </b>" & Request.Form("tel")
strBody = strBody & "<br><b>E-mail: </b>" & strReturnEmailAddress
strBody = strBody & "<br><br><b>Enquiry: - </b><br>" &
Replace(Request.Form("enquiry"), vbCrLf, "<br>")
If Len(strReturnEmailAddress) < 5 OR NOT Instr(1, strReturnEmailAddress, "
") = 0 OR InStr(1, strReturnEmailAddress, "@", 1) < 2 OR
InStrRev(strReturnEmailAddress, ".") < InStr(1, strReturnEmailAddress, "@",
1) Then
strReturnEmailAddress = strMyEmailAddress
End If
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = Request.Form("firstName") & " " & Request.Form("lastName")
& " <" & strReturnEmailAddress & ">"
objCDOMail.To = strMyEmailAddress
objCDOMail.Cc = strCCEmailAddress
objCDOMail.Bcc = strBCCEmailAddress
objCDOMail.Subject = "Enquiry sent from enquiry form on website"
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Body = strBody
objCDOMail.Importance = 2
objCDOMail.Send
Set objCDOMail = Nothing
%>
<table align="center">
<tr>
<td align="center">
<p>Thank-you
<% = Request.Form("firstName") %>
<% = Request.Form("lastName") %> for submiting your request .<br>
</p>
<p></p>
</td>
</tr>
</table>
</body>
</html>
Sara22 Guest
-
cdonts.dll on x64
Hi... I know I'm probably going to take a lot of grief over this, but we have a pile of legacy code still using CDONTS on 32-bit systems. We're... -
CDONTS vs CDO
OK, so obviously cdonts doesnt work with ii6. Why its depreciated, i dont know. What i need to know is how to just send a simple email, my old... -
using CDONTS on XP iis 5.1
Hi Folks. Trying to use ASP to submit data to both an access database and to an e-mail address at the same time. After downloading the example... -
CDONTS for IIS 5.1
Hi all, I'm trying to get a better understanding of how to use CDONTS on a web server, and I find that I don't have it installed on my own. I'm... -
CDONTS & BCC
Hi I have a website hosted on a virtual server, and am trying to run a script that sends an email with a BCC address. The email gets sent just...



Reply With Quote

