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. Web Development
  3. ASP.NET
  4. asp .net send mail

asp .net send mail

Scheduled Pinned Locked Moved ASP.NET
csharpphpasp-netcomsysadmin
4 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.
  • V Offline
    V Offline
    vcorn
    wrote on last edited by
    #1

    hi all, I'm trying to send mail using asp.net and smtp server set up on the same machine, this machine belongs to a domain, I follow the code described in article below http://www.developer.com/net/asp/article.php/3096831 I didn't get any exceptions, but when I check the recipient mail I keyed in, there is no messages sent. I wonder whether it's asp.net unable to send mail or something wrong with smtp server. Help please...

    H 1 Reply Last reply
    0
    • V vcorn

      hi all, I'm trying to send mail using asp.net and smtp server set up on the same machine, this machine belongs to a domain, I follow the code described in article below http://www.developer.com/net/asp/article.php/3096831 I didn't get any exceptions, but when I check the recipient mail I keyed in, there is no messages sent. I wonder whether it's asp.net unable to send mail or something wrong with smtp server. Help please...

      H Offline
      H Offline
      Hellin
      wrote on last edited by
      #2

      using System.Web.Mail; /*****************************************************************/ MailMessage mail = new MailMessage(); mail.To = "Your Email Address"; mail.From ="hellin_zhang@hotmail.com"; mail.Subject = "hello, buddy" mail.Body = "Some text goes here"; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "hellin_zhang"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "123456"); //set your password here SmtpMail.SmtpServer = "smtp.hotmail.com.com"; try{ SmtpMail.Send( mail ); }catch(Exception ex){ }

      V V 2 Replies Last reply
      0
      • H Hellin

        using System.Web.Mail; /*****************************************************************/ MailMessage mail = new MailMessage(); mail.To = "Your Email Address"; mail.From ="hellin_zhang@hotmail.com"; mail.Subject = "hello, buddy" mail.Body = "Some text goes here"; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "hellin_zhang"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "123456"); //set your password here SmtpMail.SmtpServer = "smtp.hotmail.com.com"; try{ SmtpMail.Send( mail ); }catch(Exception ex){ }

        V Offline
        V Offline
        vcorn
        wrote on last edited by
        #3

        Hi Hellin, Thanks for the code. But I couldn't access the url u put there http://schemas.microsoft.com/cdo/configuration/smtpauthenticate and the other two cannot be accessed too. "Page cannot be displayed" when i open in the browser. Could you explain a bit whether hotmail provide such service? and is it possible if i use localhost? Thanks

        1 Reply Last reply
        0
        • H Hellin

          using System.Web.Mail; /*****************************************************************/ MailMessage mail = new MailMessage(); mail.To = "Your Email Address"; mail.From ="hellin_zhang@hotmail.com"; mail.Subject = "hello, buddy" mail.Body = "Some text goes here"; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "hellin_zhang"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "123456"); //set your password here SmtpMail.SmtpServer = "smtp.hotmail.com.com"; try{ SmtpMail.Send( mail ); }catch(Exception ex){ }

          V Offline
          V Offline
          vasumathi n
          wrote on last edited by
          #4

          what is ur concept?

          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