Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I'm having problems with the below. It works without the attachment feature. But with the included feature its not submitting???
--------------
<%
if Request.Querystring("isSubmitted" = "yes" then
Dim objCDO
Dim fname, lname, strFileName, lngAttEncode
fname = Request.Querystring("First_Name"
lname = Request.Querystring("Last_Name"
strFileName = Trim(Request.Form("txtattfile")
lngAttEncode = Trim(Request("optAttEncode")
Set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.From = "ELEXON TEST ASP MAIL!"
objCDO.To = "michael.dang@elexon.co.uk"
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "Submitted form data from my page"
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Body = "Name: " & fname & " " & lname
if Len(Trim(strFileName)) > 0 Then
objCDO.AttachFile strFileName, , lngAttEncode
end if
objCDO.Send
Set objCDO = Nothing
ConfirmMsg = "Thanks for submitting your name!"
end if
%>
<html>
<head><title>ASP Send Mail</title></head>
<body>
<% if ConfirmMsg <> "" then %>
<h2><%= ConfirmMsg %></h2>
<% end if %>
<form action="aspmail.asp" method="get" name="Input_Form">
First Name: <input type="text" size="30" maxlength="50" name="First_Name">
<br>Last Name: <input type="text" size="30" maxlength="50" name="Last_Name">
<br>Comments <input type="text" size="30" maxlength="50" name="Comments">
<br>Attach file: <input type="file" name="txtattfile">
<br><input type="radio" name="optAttEncode" value="0" checked>UUENCODE
<br><input type="radio" name="optAttEncode" value="2">Base 64
<input type="hidden" name="isSubmitted" value="yes">
<input type="submit" value="Submit Form">
</form>
</body>
</html>
I'm having problems with the below. It works without the attachment feature. But with the included feature its not submitting???
--------------
<%
if Request.Querystring("isSubmitted" = "yes" then
Dim objCDO
Dim fname, lname, strFileName, lngAttEncode
fname = Request.Querystring("First_Name"
lname = Request.Querystring("Last_Name"
strFileName = Trim(Request.Form("txtattfile")
lngAttEncode = Trim(Request("optAttEncode")
Set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.From = "ELEXON TEST ASP MAIL!"
objCDO.To = "michael.dang@elexon.co.uk"
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "Submitted form data from my page"
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Body = "Name: " & fname & " " & lname
if Len(Trim(strFileName)) > 0 Then
objCDO.AttachFile strFileName, , lngAttEncode
end if
objCDO.Send
Set objCDO = Nothing
ConfirmMsg = "Thanks for submitting your name!"
end if
%>
<html>
<head><title>ASP Send Mail</title></head>
<body>
<% if ConfirmMsg <> "" then %>
<h2><%= ConfirmMsg %></h2>
<% end if %>
<form action="aspmail.asp" method="get" name="Input_Form">
First Name: <input type="text" size="30" maxlength="50" name="First_Name">
<br>Last Name: <input type="text" size="30" maxlength="50" name="Last_Name">
<br>Comments <input type="text" size="30" maxlength="50" name="Comments">
<br>Attach file: <input type="file" name="txtattfile">
<br><input type="radio" name="optAttEncode" value="0" checked>UUENCODE
<br><input type="radio" name="optAttEncode" value="2">Base 64
<input type="hidden" name="isSubmitted" value="yes">
<input type="submit" value="Submit Form">
</form>
</body>
</html>