Menu

void AddAttachment(Stream stream) broken

Help
Scott Waye
2007-03-30
2013-04-15
  • Scott Waye

    Scott Waye - 2007-03-30

    This method on the MailMessage class looks like it lets you add an attachment using a stream, but it appears that this just adds the stream to the underlying attachments ArrayList which is later iterated into an Attachment variable whereupon it bombs with a type cast exception.  Better to drop this overload I think and force the user of the AddAttachment(Attachment ) method and use new Attachment(Stream s, string, filename)

     
    • Ian Stallings

      Ian Stallings - 2008-01-30

      Thanks! I'll review this code and place it in my last release.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.