Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. System.Web.Mail.MailAttachment problems with sending a message with attachment file

System.Web.Mail.MailAttachment problems with sending a message with attachment file

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    ZenyukIV
    wrote on last edited by
    #1

    Hello everyone! I know that System.Web is obsolete, but I can't use System.Net. becouse MS update for System.Net does't work for me. So I have to use System.Web.Mail.MailMessage instead. It works fine. But when I try to attach file with mailMessage.Attachments.Add(new System.Web.Mail.MailAttachment(Settings.Default.LicenseFilesStore + licenseFilePath)); My e-mail simply could't be delivered Could someone please provide me with an advice. M.b. suggestion to download & use some custom developed smtp class. Thanks in advance.

    D Z 2 Replies Last reply
    0
    • Z ZenyukIV

      Hello everyone! I know that System.Web is obsolete, but I can't use System.Net. becouse MS update for System.Net does't work for me. So I have to use System.Web.Mail.MailMessage instead. It works fine. But when I try to attach file with mailMessage.Attachments.Add(new System.Web.Mail.MailAttachment(Settings.Default.LicenseFilesStore + licenseFilePath)); My e-mail simply could't be delivered Could someone please provide me with an advice. M.b. suggestion to download & use some custom developed smtp class. Thanks in advance.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      ZenyukIV wrote:

      becouse MS update for System.Net does't work for me.

      And why's that?

      ZenyukIV wrote:

      My e-mail simply could't be delivered

      Was there any return message?? Some kind of error message?? Anything on the recipients end at all??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      Z 1 Reply Last reply
      0
      • D Dave Kreskowiak

        ZenyukIV wrote:

        becouse MS update for System.Net does't work for me.

        And why's that?

        ZenyukIV wrote:

        My e-mail simply could't be delivered

        Was there any return message?? Some kind of error message?? Anything on the recipients end at all??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        Z Offline
        Z Offline
        ZenyukIV
        wrote on last edited by
        #3

        Dave Kreskowiak wrote:

        And why's that?

        I don't know why MS update for System.Net does't work for me. So I use System.Web

        Dave Kreskowiak wrote:

        Was there any return message?? Some kind of error message?? Anything on the recipients end at all??

        Return message - "protocol is unknown" Exception data - "System.Collections.ListDictionaryInternal" Nothing on the recipients with attached file. But works well without attachment. Thanks for help

        1 Reply Last reply
        0
        • Z ZenyukIV

          Hello everyone! I know that System.Web is obsolete, but I can't use System.Net. becouse MS update for System.Net does't work for me. So I have to use System.Web.Mail.MailMessage instead. It works fine. But when I try to attach file with mailMessage.Attachments.Add(new System.Web.Mail.MailAttachment(Settings.Default.LicenseFilesStore + licenseFilePath)); My e-mail simply could't be delivered Could someone please provide me with an advice. M.b. suggestion to download & use some custom developed smtp class. Thanks in advance.

          Z Offline
          Z Offline
          ZenyukIV
          wrote on last edited by
          #4

          Thanks for everyone. I've refused using System.Web namespace becouse I've solved the problem with System.Net The problem was pretty stupid. I've downloaded update for Framework 2.0 link[^] and installed it to ALL CUSTOMERS' PCs.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups