0 Replies - 7466 Views - Last Post: 13 January 2012 - 11:51 AM

#1 elbee  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 28-September 10

Need Form to allow multiple attachments which email on submit

Posted 13 January 2012 - 11:51 AM

Hello,

I have an html form file and a corresponding asp file. I need the form to allow multiple attachments which are emailed when the user clicks Submit. So far nothing has worked. Of course, getting the Browse and the box to upload a file is easy; however, I'm missing something. I think it must be in the asp file.
http://jpl.coj.net/w...tinghandler.asp


<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
	objMessage.AddAttachment 
	objMessage.AddAttachment 
	objEmail.Send	
%>	

</div>

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


I would appreciate any help I can get. Thank you. Elbee

Attached File(s)



Is This A Good Question/Topic? 0
  • +

Page 1 of 1