How can I have my page email a csv file created from an online form?

Discussion in 'ASP General' started by Les, Aug 20, 2003.

  1. Les

    Les Guest

    I've just started working with ASP 5 days ago, so go easy on me.
    My company needs an online form that user's can enter information into
    and once submitted, will dump the user-supplied info into a csv file
    and email it to the person who heads up the project. Initially, I
    thought they wanted the form to save the data to a database, and after
    playing all weekend, I was able to do that. Today I learned that they
    prefer the emailing a csv file method instead.
    Any links to tutorials on this subject or sample code with explanation
    would be greatly appreciated! Again, I'm new at this and baby steps
    are best :)

    Thanks in advance,

    Les
    Les, Aug 20, 2003
    #1
    1. Advertising

  2. Les

    Evertjan. Guest

    Les wrote on 20 aug 2003 in microsoft.public.inetserver.asp.general:

    > Today I learned that they
    > prefer the emailing a csv file method instead.
    > Any links to tutorials on this subject or sample code with explanation
    > would be greatly appreciated! Again, I'm new at this and baby steps
    > are best :)
    >


    <http://www.aspfaq.com/show.asp?id=2119>

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Aug 20, 2003
    #2
    1. Advertising

  3. Les

    Les Guest

    Thank you for your quick response and the link.
    <http://www.aspfaq.com/show.asp?id=2119> but I should have been more
    explicit in my post.

    As I've never done this before, I'm assuming that I can figure out how
    to:

    1. Write the data submitted in the form to a csv file
    2. Save that to the server and then
    3. Have the csv attached to an email and sent to the project manager.

    My question is: can the csv file be created "on the fly" (not saved to
    the server) and attached to the email which would be created from my
    ASP page? I read through the aspfaq site, but was unable to find if
    this were possible.

    Once again thanks so much,

    Les
    Les, Aug 21, 2003
    #3
  4. "Les" <> wrote in message
    news:...
    > Thank you for your quick response and the link.
    > <http://www.aspfaq.com/show.asp?id=2119> but I should have been more
    > explicit in my post.
    >
    > As I've never done this before, I'm assuming that I can figure out how
    > to:
    >
    > 1. Write the data submitted in the form to a csv file
    > 2. Save that to the server and then
    > 3. Have the csv attached to an email and sent to the project manager.
    >
    > My question is: can the csv file be created "on the fly" (not saved to
    > the server) and attached to the email which would be created from my
    > ASP page? I read through the aspfaq site, but was unable to find if
    > this were possible.
    >
    > Once again thanks so much,
    >
    > Les


    Check out the GetDecodedContentStream Method of the BodyPart(attachment)
    object
    http://msdn.microsoft.com/library/en-us/cdosys/html/_cdosys_ibodypart_getdecodedcontentstream.asp

    The basic premise is that all simple (versus multipart) bodyparts have
    an associated stream interface. You can load content into the
    bodypart(i.e. attachment) via the stream interface by using the
    Write/WriteText methods. You indicated that you already know how to
    retrieve the submitted file content from the Request object, but just in
    case, here's an article that describes a component-less method for doing
    so:

    http://msdn.microsoft.com/library/en-us/dnasdj01/html/asp0900.asp

    HTH
    -Chris
    Chris Hohmann, Aug 21, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jimjim
    Replies:
    12
    Views:
    1,875
    Ron Natalie
    Jun 3, 2005
  2. Tintin92
    Replies:
    1
    Views:
    1,672
    Andrew Thompson
    Feb 14, 2007
  3. jliu66
    Replies:
    0
    Views:
    492
    jliu66
    Oct 19, 2007
  4. Li Chen
    Replies:
    18
    Views:
    642
    Azmi Farih
    Mar 23, 2010
  5. Replies:
    13
    Views:
    441
    Randy Webb
    May 14, 2006
Loading...

Share This Page