Thread: Requesting an attachment
Results 1 to 7 of 7
05-09-2003, 03:45 PM #1
Requesting an attachment
Now that a have the form working for the feedback form (using ASP Mail) I need to do the same thing for the Resume form. So far so good. What I want to do is, after the person fills out the required info on the form and hits the Submit button, is there a way for them to send an attached resume with the form submission? Or is there some other way to let them attach the resume?
05-09-2003, 03:56 PM #2
Best bet would be to use an upload component to get the file, then use method AddAttachment to attach to mail.
More details with the official docs here -http://www.softcomplex.com/products/asp_mail_component/docs/#addattachment
05-09-2003, 05:27 PM #3
yes that what i had to do for www.jmktwine.com i was having some trouble with the same thang and http://www.softcomplex.com/products/asp_mail_component/docs/#addattachment that really helps
05-10-2003, 12:20 PM #4
Thanks guys. I'll see if I can muddle my way through this. :-) The link and advice are a big help.
05-10-2003, 12:27 PM #5
Sorry, after looking this over a bit, I have a question (didn't you know I would?) <grin>
How does this work? Is the e-mail called up when the person clicks on the Submit button and then what happens? Are they prompted to attach their resume? Where does the #addAttachment go?
Oops, gotta go!
05-10-2003, 01:21 PM #6
You would use <input type="file"> for the user to upload the attachment, store it on server, then use 'AddAttachment' to send it with the email.
05-14-2003, 08:51 AM #7
Of course, I'm having trouble with this. I know very little about scripting, this is just a one-shot deal for the moment. I have the <input type="file"> tag in the form. (I knew about that, but forgot since it's been two years since I've done this stuff.>
I added the AddAttachment in the formmai.asp, but when I try go to the web to test the form, I get an error message that says the form cannot be processed because the E-mail recipient is missing. Here is the line from the form:
'<form name="Resume" action="/forms/formmail.asp" method="post" enctype="multipart/form-data">
<input name="_recipients" type="hidden" value="firstname.lastname@example.org" />
Here is where I added the AddAttachment in the script:
'Send email (ASPMail version).
if mailComp = "ASPMail" then
set mailObj = Server.CreateObject("SMTPsvg.Mailer")
mailObj.FromAddress = fromAddr
mailObj.RemoteHost = smtpServer
mailObj.ReplyTo = replyTo
for each addr in Split(recipients, ",")
mailObj.AddRecipient "", Trim(addr)
mailObj.Subject = subject
mailObj.ContentType = "text/html"
mailObj.BodyText = body
if not mailObj.SendMail then
SendMail = "Email send failed: " & mailObj.Response & "."
So what am I doing wrong? Also, is "C:\boot.ini" supposed to be left in there as a generic place to start, or do I change it to something else?
Many thanks for gritting your teeth and having patience with me. (You are aren't you?)