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. asp.net email

asp.net email

Scheduled Pinned Locked Moved ASP.NET
questioncsharphtmlasp-netcom
11 Posts 5 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.
  • X xiaowenjie

    i'm having this error:" System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid." i'm using windows 2000 pro. do i need to set my SmtpMail.SmtpServer?? if so how do i identify my server? im using IIS as my local host.. using System.Web.Mail; .... namespace WebApplication1 { public class WebForm1 : System.Web.UI.Page ......... private void Submit1_ServerClick(object sender, System.EventArgs e) { MailMessage mm = new MailMessage(); mm.From = "test@hotmail.com"; mm.To ="test@hotmail.com"; mm.Cc = "nothing"; mm.Bcc = " nothing"; mm.BodyFormat = MailFormat.Html; mm.Priority = MailPriority.High; mm.Subject = "chris first asp.net email"; mm.Body = "hey this is easier then i thought"; SmtpMail.Send(mm); } Chris

    M Offline
    M Offline
    mmikey7
    wrote on last edited by
    #2

    nuttynibbles1984 wrote: do i need to set my SmtpMail.SmtpServer?? Yes, SmtpMail.SmtpServer= "YourMailServer"; As YourMailserver you can use mail server of your internet provider or localhost if you have started SMTP virtual server on your IIS. Hth

    X 1 Reply Last reply
    0
    • M mmikey7

      nuttynibbles1984 wrote: do i need to set my SmtpMail.SmtpServer?? Yes, SmtpMail.SmtpServer= "YourMailServer"; As YourMailserver you can use mail server of your internet provider or localhost if you have started SMTP virtual server on your IIS. Hth

      X Offline
      X Offline
      xiaowenjie
      wrote on last edited by
      #3

      ya i did use SmtpMail.SmtpServer = "localhost"; but it gave me an error " System.Runtime.InteropServices.COMException: Class not registered " why is it like this? Chris

      J 1 Reply Last reply
      0
      • X xiaowenjie

        ya i did use SmtpMail.SmtpServer = "localhost"; but it gave me an error " System.Runtime.InteropServices.COMException: Class not registered " why is it like this? Chris

        J Offline
        J Offline
        Jacob Koppang
        wrote on last edited by
        #4

        http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration.asp[^] check that site out. it's not C#, or even .Net, but in the TOC on the left, it will list the various fields that can be used. The "sendusing" field can be set as such: MailMessage myMessage = new MailMessage(); myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "1"; // for a local SMTP server myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "2"; // for a remote SMTP server The authentication for your outgoing mail server can be set with other fields in this same manner. Just change "sendusing" at the end of the indexer to one of the other fields and assign it the value it needs. Then last, but not least, set the server like normal (SmtpMail.SmtpServer = "server") and then send it on it's way. Hope this helps! Jacob Koppang Manuet Systems Senior Project Manager http://www.manuet.com

        X 3 Replies Last reply
        0
        • J Jacob Koppang

          http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration.asp[^] check that site out. it's not C#, or even .Net, but in the TOC on the left, it will list the various fields that can be used. The "sendusing" field can be set as such: MailMessage myMessage = new MailMessage(); myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "1"; // for a local SMTP server myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "2"; // for a remote SMTP server The authentication for your outgoing mail server can be set with other fields in this same manner. Just change "sendusing" at the end of the indexer to one of the other fields and assign it the value it needs. Then last, but not least, set the server like normal (SmtpMail.SmtpServer = "server") and then send it on it's way. Hope this helps! Jacob Koppang Manuet Systems Senior Project Manager http://www.manuet.com

          X Offline
          X Offline
          xiaowenjie
          wrote on last edited by
          #5

          erm do we need microsoft outlook? coz currently there some error with my outlook. chris

          1 Reply Last reply
          0
          • J Jacob Koppang

            http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration.asp[^] check that site out. it's not C#, or even .Net, but in the TOC on the left, it will list the various fields that can be used. The "sendusing" field can be set as such: MailMessage myMessage = new MailMessage(); myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "1"; // for a local SMTP server myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "2"; // for a remote SMTP server The authentication for your outgoing mail server can be set with other fields in this same manner. Just change "sendusing" at the end of the indexer to one of the other fields and assign it the value it needs. Then last, but not least, set the server like normal (SmtpMail.SmtpServer = "server") and then send it on it's way. Hope this helps! Jacob Koppang Manuet Systems Senior Project Manager http://www.manuet.com

            X Offline
            X Offline
            xiaowenjie
            wrote on last edited by
            #6

            ok heres my coding: MailMessage mm = new MailMessage(); mm.From = "test@hotmail.com"; mm.To ="test@hotmail.com"; mm.Cc = "nothing"; mm.Bcc = " nothing"; mm.BodyFormat = MailFormat.Html; mm.Priority = MailPriority.Low; mm.Subject = "my first asp.net email"; mm.Body = "hey this is easier then i thought"; mm.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "1"; // for a local SMTP server SmtpMail.SmtpServer = ""; SmtpMail.Send(mm); since i'm using localhost, i dun have to specify the server name rite, if not hw do i identify my server name? is it go to Administrative Tools->Internet information services->Right click Default SMTP Virtual Server->properties? if this is correct, then it gave me this error: "System.Runtime.InteropServices.COMException: The pickup directory path is required and was not specified." whoa sending an email is that difficult :-D Chris

            1 Reply Last reply
            0
            • J Jacob Koppang

              http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration.asp[^] check that site out. it's not C#, or even .Net, but in the TOC on the left, it will list the various fields that can be used. The "sendusing" field can be set as such: MailMessage myMessage = new MailMessage(); myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "1"; // for a local SMTP server myMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "2"; // for a remote SMTP server The authentication for your outgoing mail server can be set with other fields in this same manner. Just change "sendusing" at the end of the indexer to one of the other fields and assign it the value it needs. Then last, but not least, set the server like normal (SmtpMail.SmtpServer = "server") and then send it on it's way. Hope this helps! Jacob Koppang Manuet Systems Senior Project Manager http://www.manuet.com

              X Offline
              X Offline
              xiaowenjie
              wrote on last edited by
              #7

              hi i went to do try and catch. they give me this error." Could not access 'CDO.Message' object" i think is the setting of my IIS. erm anw cud u tell me hw to identify my server name. im using localhost on my computer. Chris

              M 1 Reply Last reply
              0
              • X xiaowenjie

                i'm having this error:" System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid." i'm using windows 2000 pro. do i need to set my SmtpMail.SmtpServer?? if so how do i identify my server? im using IIS as my local host.. using System.Web.Mail; .... namespace WebApplication1 { public class WebForm1 : System.Web.UI.Page ......... private void Submit1_ServerClick(object sender, System.EventArgs e) { MailMessage mm = new MailMessage(); mm.From = "test@hotmail.com"; mm.To ="test@hotmail.com"; mm.Cc = "nothing"; mm.Bcc = " nothing"; mm.BodyFormat = MailFormat.Html; mm.Priority = MailPriority.High; mm.Subject = "chris first asp.net email"; mm.Body = "hey this is easier then i thought"; SmtpMail.Send(mm); } Chris

                R Offline
                R Offline
                Rocky Moore
                wrote on last edited by
                #8

                I never use the built in mail routines, the configuration is too easily hosed on the server. I also use OpenSmtp for my sites: http://sourceforge.net/projects/opensmtp-net/[^] Rocky <>< www.HintsAndTips.com - Now with "Recommendation" postings www.JokesTricksAndStuff.com www.MyQuickPoll.com - Now with RSS Feed and Prizes www.GotTheAnswerToSpam.com - Again :)

                X 1 Reply Last reply
                0
                • X xiaowenjie

                  hi i went to do try and catch. they give me this error." Could not access 'CDO.Message' object" i think is the setting of my IIS. erm anw cud u tell me hw to identify my server name. im using localhost on my computer. Chris

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

                  This error happens due to some reasons, and many people have the same problem. Have a look at these suggestions[^], that hight help.

                  1 Reply Last reply
                  0
                  • R Rocky Moore

                    I never use the built in mail routines, the configuration is too easily hosed on the server. I also use OpenSmtp for my sites: http://sourceforge.net/projects/opensmtp-net/[^] Rocky <>< www.HintsAndTips.com - Now with "Recommendation" postings www.JokesTricksAndStuff.com www.MyQuickPoll.com - Now with RSS Feed and Prizes www.GotTheAnswerToSpam.com - Again :)

                    X Offline
                    X Offline
                    xiaowenjie
                    wrote on last edited by
                    #10

                    erm smtpserver got anything to do with microsoft outlook or outlook express? Chris

                    R 1 Reply Last reply
                    0
                    • X xiaowenjie

                      erm smtpserver got anything to do with microsoft outlook or outlook express? Chris

                      R Offline
                      R Offline
                      Rocky Moore
                      wrote on last edited by
                      #11

                      No, it is an open source library written in C# to send mail. Easy to use and does not rely on settings on the server, just include the library and send messages. Rocky <>< www.HintsAndTips.com - Now with "Recommendation" postings www.JokesTricksAndStuff.com www.MyQuickPoll.com - Now with RSS Feed and Prizes www.GotTheAnswerToSpam.com - Again :)

                      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