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. Please Help

Please Help

Scheduled Pinned Locked Moved ASP.NET
help
4 Posts 4 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.
  • M Offline
    M Offline
    mahmoud mohammed
    wrote on last edited by
    #1

    :((I try to Send e-mail from local machine (local Host) to remot mail at yahoo the program fail to send this mail please help me with full steps and needed steps for configure SMTP and SmtpMail.SmtpServer thanks for all

    C B J 3 Replies Last reply
    0
    • M mahmoud mohammed

      :((I try to Send e-mail from local machine (local Host) to remot mail at yahoo the program fail to send this mail please help me with full steps and needed steps for configure SMTP and SmtpMail.SmtpServer thanks for all

      C Offline
      C Offline
      chakkara2003
      wrote on last edited by
      #2

      .NET 2.0 includes much richer Email API support within the System.Net.Mail code namespace. I've seen a few questions from folks wondering about how to get started with it. Here is a simple snippet of how to send an email message from “sender@foo.bar.com” to multiple email recipients (note that the To a CC properties are collections and so can handle multiple address targets): MailMessage message = new MailMessage(); message.From = new MailAddress("sender@foo.bar.com"); message.To.Add(new MailAddress("recipient1@foo.bar.com")); message.To.Add(new MailAddress("recipient2@foo.bar.com")); message.To.Add(new MailAddress("recipient3@foo.bar.com")); message.CC.Add(new MailAddress("carboncopy@foo.bar.com")); message.Subject = "This is my subject"; message.Body = "This is the content"; SmtpClient client = new SmtpClient(); client.Send(message); System.Net.Mail reads SMTP configuration data out of the standard .NET configuration system (so for ASP.NET applications you’d configure this in your application’s web.config file). Here is an example of how to configure it: from tis inside html tag system.net mailSettings smtp from="test@foo.com" network host="smtpserver1" port="25" userName="username" password="secret" defaultCredentials="true" smtp mailSettings system.net upto tis inside html tag or http://www.codeproject.com/useritems/EmailApplication.asp hope tis will help u, to configure smtp http://www.aspit.net/tutorials/specific/configuring\_smtp\_server\_under\_iis\_step\_by\_step.asp coolsweety -- modified at 7:27 Thursday 20th April, 2006

      1 Reply Last reply
      0
      • M mahmoud mohammed

        :((I try to Send e-mail from local machine (local Host) to remot mail at yahoo the program fail to send this mail please help me with full steps and needed steps for configure SMTP and SmtpMail.SmtpServer thanks for all

        B Offline
        B Offline
        benqazou
        wrote on last edited by
        #3

        Salam, First, do you have an SMTP server installed on one of your machines?? Or do you have an email with SMTP support (free webmails like yahoo, hotmail..etc do not allow to send emails programmatically through their SMTP servers...) Once you have a valid SMTP server, here's some code to do so : MailMessage mail = new MailMessage(); mail.To = "xxxx@yahoo.com"; mail.Bcc = "yyyy@yahoo.com; sersif@mce.gov.ma"; mail.From = "your email or name"; mail.Subject = "your subject"; mail.Body = "your subject"; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "YOUR EMAIL USERNAME"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "YOUR EMAIL PASSWORD"); //set your password here SmtpMail.SmtpServer = "10.4.1.2"; //your real server goes here SmtpMail.Send(mail);

        1 Reply Last reply
        0
        • M mahmoud mohammed

          :((I try to Send e-mail from local machine (local Host) to remot mail at yahoo the program fail to send this mail please help me with full steps and needed steps for configure SMTP and SmtpMail.SmtpServer thanks for all

          J Offline
          J Offline
          J4amieC
          wrote on last edited by
          #4

          Im glad you got some decent responses...those people are very patient. 1) Please use descriptive subject titles - Everyone wants "Help", but thanks for at leastusing please ;) 2) telling us "it fails" does not help us solve your problem. Please remember to post the code you are using and the exception message that is given.

          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