Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Help With File Field.
12-26-2006, 07:15 AM #1
Help With File Field.
Hey guys, was wondering if it is possible to read the entire content of a file field,
the file field has in it "C:\Documents and Settings\administrator\Desktop\Untitled-1.jpg"
but after submitted, request.form only returns "Untitled-1.jpg"
i need the entire path form the file field, im trying to make an email system that sends emails with attachments. and the file field is the attachment that will be sent.
can someone please help, cheers.
this is my code.Code:
<% if request.querystring("id") = 21 then Dim ObjSendMail Dim iConf Dim Flds Set ObjSendMail = Server.CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup" Flds.Update Set ObjSendMail.Configuration = iConf ObjSendMail.To = "firstname.lastname@example.org" ObjSendMail.Subject = "email@example.com" ObjSendMail.From = "firstname.lastname@example.org" ObjSendMail.htmlBody = "this is the body" ObjSendMail.AddAttachment request.Form("file1") ObjSendMail.Send Set ObjSendMail = Nothing response.Redirect("default.asp") else end if %>
Last edited by Baleric; 12-26-2006 at 07:36 AM.
12-26-2006, 08:55 AM #2
- Join Date
- Dec 2006
- Thanked 0 Times in 0 Posts
I am afraid you have to upload this file to server first if you want send it as attachment.
01-01-2007, 11:31 PM #3