Email attachment from InputStream?

Discussion in 'ASP .Net' started by steven shingler, Jan 19, 2004.

  1. Hi all
    I've figured out how to add an attachment to a MailMessage object from
    a physical file on the hard disk, but would very much like to be able
    to do this using an InputStream instead. This could be particularly
    useful handling a PostedFile from a WebForm.
    Has anyone got any ideas on this?
    Best Wishes
    Steven
     
    steven shingler, Jan 19, 2004
    #1
    1. Advertisements

  2. steven shingler

    Shiv Kumar Guest

    The MailAttachment class sadly only allows for physical files. So your only
    option is to save a file (convert the stream to a file) and then attach that
    file.

    --
    Shiv R. Kumar
    http://www.matlus.com
     
    Shiv Kumar, Jan 20, 2004
    #2
    1. Advertisements

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:
    649
    Matthew Lenz
    Feb 22, 2005
  2. Sam
    Replies:
    1
    Views:
    521
  3. peter x

    Email Attachment

    peter x, Mar 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    551
    Chad Z. Hower aka Kudzu
    Mar 3, 2004
  4. =?Utf-8?B?U2liQW5kZWxh?=

    uploaded file as attachment to email generate on server

    =?Utf-8?B?U2liQW5kZWxh?=, Jul 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    481
    =?Utf-8?B?U2liQW5kZWxh?=
    Jul 29, 2004
  5. =?iso-8859-2?Q?Piotr_W=F3jcicki?=

    email attachment from string

    =?iso-8859-2?Q?Piotr_W=F3jcicki?=, Sep 9, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    657
    Hugo Wetterberg
    Sep 9, 2004
  6. Trapulo
    Replies:
    1
    Views:
    495
    Mike Bridge
    Apr 27, 2005
  7. R
    Replies:
    5
    Views:
    2,359
    Kevin McMurtrie
    Mar 13, 2005
  8. ecureuil
    Replies:
    0
    Views:
    616
    ecureuil
    May 28, 2006
Loading...