...

View Full Version : Form Needs to Allow Attachments



Elbee
01-12-2012, 04:44 PM
Hello,

I have a form which needs to allow for attachments. Our server is strictly Microsoft products and will not support PHP.

[URL] http://jpl.coj.net/webposting.html
[URL] http://jpl.coj.net/webpostinghandler.asp

Old Pedant
01-13-2012, 08:46 PM
Ummm...you posted in the wrong forum. Pages ending in "asp" are CLASSIC ASP, not ASP.NET.

Elbee
01-15-2012, 01:34 AM
Here's the asp file code:



<h3>Thank you!</h3>
<div class="webform">

<%
Dim MsgBody, TargetEmail, TargetSubject

TargetDept = "Technical Support"
TargetEmail = "eckersen@coj.net"
TargetSubject = "Request for website posting"
MsgBody = "The following question was received from " & Request.Form("SubmittedBy")
MsgBody = MsgBody & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Is your request for posting to: " & Request.Form("site") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Do you have a flier(s) or image you need posted?: " & Request.Form("scope") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Date of Request: " & Request.Form("daterequest") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Date Needed: " & Request.Form("needed") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Contact Name: " & Request.Form("SubmittedBy") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~E-mail: " & Request.Form("email") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Phone: " & Request.Form("phone") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Requests: " & Request.Form("other") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Display Dates: " & Request.Form("length") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Title of Program: " & Request.Form("title") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Date of Program: " & Request.Form("date") & vbCRLF & vbCRLF
MsgBody = MsgBody & "~~Location: " & Request.Form("location") & vbCRLF & vbCRLF

%>

<p><strong>Recap of submission:</strong></p>
<p><strong>Subject:</strong></p> <% Response.Write(TargetSubject) %>
<p><strong>Department:</strong></p> <% Response.Write(TargetDept) %>
<p><strong>Your Message:</strong></p> <% Response.Write(MsgBody) %>

<%

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "website@jpl.coj.net"
objEmail.To = TargetEmail
objEmail.Subject = TargetSubject
objEmail.Textbody = MsgBody
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.coj.net"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
%>

</div>

<p class="clear_both"></p>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum