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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to send email using Windows Forms

How to send email using Windows Forms

Scheduled Pinned Locked Moved ASP.NET
tutorialasp-netwinformsquestionworkspace
8 Posts 3 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.
  • S Offline
    S Offline
    SABhatti
    wrote on last edited by
    #1

    Can someone guide me the best way to send email in windows forms (not web forms), right now I'm using CDO.Message and have to create it in a conventional way CreateObject("CDO.Message") and CreateObject("CDO.Configuration"). Is there any other way? -----

    M 1 Reply Last reply
    0
    • S SABhatti

      Can someone guide me the best way to send email in windows forms (not web forms), right now I'm using CDO.Message and have to create it in a conventional way CreateObject("CDO.Message") and CreateObject("CDO.Configuration"). Is there any other way? -----

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Use System.Web.Mail objects in .NET http://www.systemwebmail.com[^] is a great resource on this namespace.

      S 1 Reply Last reply
      0
      • M Mike Ellison

        Use System.Web.Mail objects in .NET http://www.systemwebmail.com[^] is a great resource on this namespace.

        S Offline
        S Offline
        SABhatti
        wrote on last edited by
        #3

        Thanks Mike, but System.Web.Mail is not available in Windows Forms, it is for Web Forms. And I am talking about email through Windows Forms or a Desktop Application -----

        M M 3 Replies Last reply
        0
        • S SABhatti

          Thanks Mike, but System.Web.Mail is not available in Windows Forms, it is for Web Forms. And I am talking about email through Windows Forms or a Desktop Application -----

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          Hi there. Sure it is available. Just include the namespace in your project source (with a using statement for C# or an imports statement for VB), and add a reference to the System.Web dll.

          S 1 Reply Last reply
          0
          • S SABhatti

            Thanks Mike, but System.Web.Mail is not available in Windows Forms, it is for Web Forms. And I am talking about email through Windows Forms or a Desktop Application -----

            M Offline
            M Offline
            Mike Ellison
            wrote on last edited by
            #5

            Just in case it helps - this isn't a WinForms app, but it is a console application that shows using System.Web.Mail outside the context of an ASP.NET app. Command Line Emailer article[^]

            1 Reply Last reply
            0
            • M Mike Ellison

              Hi there. Sure it is available. Just include the namespace in your project source (with a using statement for C# or an imports statement for VB), and add a reference to the System.Web dll.

              S Offline
              S Offline
              SABhatti
              wrote on last edited by
              #6

              thanx once again Mike, I was not adding reference so stupid of me :-D... -----

              1 Reply Last reply
              0
              • S SABhatti

                Thanks Mike, but System.Web.Mail is not available in Windows Forms, it is for Web Forms. And I am talking about email through Windows Forms or a Desktop Application -----

                M Offline
                M Offline
                minhpc_bk
                wrote on last edited by
                #7

                Hi SABhatti, That's why in the .Net framework 2.0, the classes used to send the email are placed under the new namespace System.Net.Mail [^] so that the developers will not be confused that it's only used by the ASP.NET applications.

                S 1 Reply Last reply
                0
                • M minhpc_bk

                  Hi SABhatti, That's why in the .Net framework 2.0, the classes used to send the email are placed under the new namespace System.Net.Mail [^] so that the developers will not be confused that it's only used by the ASP.NET applications.

                  S Offline
                  S Offline
                  SABhatti
                  wrote on last edited by
                  #8

                  thanx Minhcpc_bk, that's really so nice of microsoft..:-D -----

                  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