email attachment from string

Discussion in 'ASP .Net' started by =?iso-8859-2?Q?Piotr_W=F3jcicki?=, Sep 9, 2004.

  1. Is there any way of sending email with attachment created from string ? I dont want to save this string as Text file on hard drive.

    Thank you
    Piotr Wójcicki
     
    =?iso-8859-2?Q?Piotr_W=F3jcicki?=, Sep 9, 2004
    #1
    1. Advertising

  2. =?iso-8859-2?Q?Piotr_W=F3jcicki?=

    GrantMagic Guest

    I had a similair issue.

    The way i got around it, was by first creating a file on the server.
    Attaching that file to the email and sending it,
    and then finally deleting the file from the server.

    Hope that helps

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


    "Piotr Wójcicki" <pwl@USUN_TO.4me.pl> wrote in message
    news:chp9al$2v3$...
    Is there any way of sending email with attachment created from string ? I
    dont want to save this string as Text file on hard drive.

    Thank you
    Piotr Wójcicki
     
    GrantMagic, Sep 9, 2004
    #2
    1. Advertising

  3. U¿ytkownik "GrantMagic" <> napisa³ w wiadomo¶ci news:...
    > I had a similair issue.
    >
    > The way i got around it, was by first creating a file on the server.
    > Attaching that file to the email and sending it,
    > and then finally deleting the file from the server.
    >
    > Hope that helps


    It creates lots of problems cause the attachment needs to have fixed name, same for every session.
    How to avoid filenames conflicts ?
    Where to write files ? ( I want to run it on Windows 2003 server)
     
    =?iso-8859-2?Q?Piotr_W=F3jcicki?=, Sep 9, 2004
    #3
  4. =?iso-8859-2?Q?Piotr_W=F3jcicki?=

    Cor Ligthert Guest

    Cor Ligthert, Sep 9, 2004
    #4
  5. On Thu, 9 Sep 2004 13:08:22 +0200, Piotr Wójcicki wrote:

    > U¿ytkownik "GrantMagic" <> napisa³ w wiadomo¶ci news:...
    >> I had a similair issue.
    >>
    >> The way i got around it, was by first creating a file on the server.
    >> Attaching that file to the email and sending it,
    >> and then finally deleting the file from the server.
    >>
    >> Hope that helps

    >
    > It creates lots of problems cause the attachment needs to have fixed name, same for every session.
    > How to avoid filenames conflicts ?
    > Where to write files ? ( I want to run it on Windows 2003 server)


    Give the file a Guid as a name, that should resolve any potential name
    conflicts. Try using isolated storage for your file (if it works for ASP)
    http://www.ondotnet.com/pub/a/dotnet/2003/04/21/isolatedstorage.html

    /Hugo
     
    Hugo Wetterberg, Sep 9, 2004
    #5
  6. U¿ytkownik "Hugo Wetterberg" <> napisa³ w wiadomo¶ci news:...

    > Give the file a Guid as a name, that should resolve any potential name


    How do i change Attachmets name to fixed name after creating if from file named with guid ?

    Attachment.Filename property is read only.
     
    =?iso-8859-2?Q?Piotr_W=F3jcicki?=, Sep 9, 2004
    #6
  7. On Thu, 9 Sep 2004 16:27:57 +0200, Piotr Wójcicki wrote:

    > U¿ytkownik "Hugo Wetterberg" <> napisa³ w wiadomo¶ci news:...
    >
    >> Give the file a Guid as a name, that should resolve any potential name

    >
    > How do i change Attachmets name to fixed name after creating if from file named with guid ?
    >
    > Attachment.Filename property is read only.


    I guess that sort of rules out naming the file after a guid. You could
    create a folder named after the session id, or a guid (overkill), and put
    the uploaded file there. Then at least you have isolated the users from
    each other and don't have the same concurrency problem. From here it will
    be a simple matter of checking if the user already has uploaded a file with
    the same name and use some naming conventions for duplicates.

    /Hugo
     
    Hugo Wetterberg, Sep 9, 2004
    #7
    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. Matthew Lenz
    Replies:
    0
    Views:
    548
    Matthew Lenz
    Feb 22, 2005
  2. steven shingler

    Email attachment from InputStream?

    steven shingler, Jan 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    422
    Shiv Kumar
    Jan 20, 2004
  3. Sam
    Replies:
    1
    Views:
    441
  4. peter x

    Email Attachment

    peter x, Mar 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    Chad Z. Hower aka Kudzu
    Mar 3, 2004
  5. ecureuil
    Replies:
    0
    Views:
    365
    ecureuil
    May 28, 2006
Loading...

Share This Page