Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Baleric's Avatar
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    332
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With File Field.

    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.
    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
    %>
    Last edited by Baleric; 12-26-2006 at 07:36 AM.

  • #2
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    6
    Thanks
    0
    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.

  • #3
    Regular Coder Baleric's Avatar
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    332
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by njzy View Post
    I am afraid you have to upload this file to server first if you want send it as attachment.
    thanks, i got it working, the file upoloads then send to gmail then deletes it so the server doesnt get full

    cheers


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •