CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Posts
    2

    Sending files from server in an email?

    OK, bear with me, as this may be a confusing post.

    Right now we have an Access database that contains data pertaining to spam that has been caught by our spam software.

    What I'm setting up is a web page that has all these records, and I would like to be able to "release" these messages from the server.

    The database has a field that gives the .msg filename (EXAMPLE: B0000000273.MSG). These files are not contained within one folder, but rather a series of folders. Example of folder hierarchy:



    quote:
    --------------------------------------------------------------------------------
    -->QUARANTINE
    |------>0000
    --|------>B0000000273.MSG
    --|------>B0000000274.MSG
    |------>0001
    --|------>B0000005118.MSG
    |------>0002
    --|------>B0000006784.MSG

    --------------------------------------------------------------------------------



    So what I need is a link on my page that will somehow pass the "B0000000273.MSG" to an email component, which will search the folder "QUARANTINE" for "B0000000273.MSG" and if it finds it, then attach it to an email, and send it the recipient specified in the Access database.

    I have to imagine that something like this has been done before, since I do not consider myself a visionary, as a matter of fact, I think of myself as quite the opposite.

    My current page: (CAUTION: Profane language ahead)
    http://www.rdi1.com/reporting/

    Somebody please point me in the right direction.


    Thanks,
    Matt

  2. #2
    Join Date
    Feb 2002
    Location
    Mumbai, India
    Posts
    242

    Try using System.IO

    Hi,

    Try using System.IO.Directory.GetDirectories and System.IO.Directory.GetFiles to reiteratively loop thru the sub directories and check the file using System.IO.File.Exists for checking the existence of a file.

    Also, if u want some other method look @ "findfile sample" in the MSDN.

    bye,
    Rohit

  3. #3
    Join Date
    May 2003
    Posts
    2
    Sorry, but what you said was WAY over my head. I'll do some searching and see if I can clarify it myself.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured