Baleric
12-26-2006, 08:15 AM
Hey guys, was wondering if it is possible to read the entire content of a file field,
eg.
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.
baleric.
this is my 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 = "testing@testing.com"
ObjSendMail.Subject = "testing@testing.com"
ObjSendMail.From = "testing@testing.com"
ObjSendMail.htmlBody = "this is the body"
ObjSendMail.AddAttachment request.Form("file1")
ObjSendMail.Send
Set ObjSendMail = Nothing
response.Redirect("default.asp")
else
end if
%>
eg.
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.
baleric.
this is my 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 = "testing@testing.com"
ObjSendMail.Subject = "testing@testing.com"
ObjSendMail.From = "testing@testing.com"
ObjSendMail.htmlBody = "this is the body"
ObjSendMail.AddAttachment request.Form("file1")
ObjSendMail.Send
Set ObjSendMail = Nothing
response.Redirect("default.asp")
else
end if
%>