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. sending email

sending email

Scheduled Pinned Locked Moved Web Development
6 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.
  • S Offline
    S Offline
    saltcode
    wrote on last edited by
    #1

    Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help! System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28 Thanks in Advance

    M E V 3 Replies Last reply
    0
    • S saltcode

      Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help! System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28 Thanks in Advance

      M Offline
      M Offline
      Marcus J Smith
      wrote on last edited by
      #2

      Most anything you would want to learn about System.Net.Mail[^]


      CleaKO

      "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
      "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

      1 Reply Last reply
      0
      • S saltcode

        Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help! System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28 Thanks in Advance

        E Offline
        E Offline
        enjoycrack
        wrote on last edited by
        #3

        First you have to make sure the SMTP service installed on your PC? And you might post your code here... << >>

        8x Solutions Ltd

        S 1 Reply Last reply
        0
        • E enjoycrack

          First you have to make sure the SMTP service installed on your PC? And you might post your code here... << >>

          8x Solutions Ltd

          S Offline
          S Offline
          saltcode
          wrote on last edited by
          #4

          SMTP Service is running. ailMessage msg = new MailMessage("sample@lookman","kapat_saltcode@yahoo.com"); msg.Body = "Did u receive this, if u did don't reply, just testing"; msg.Subject = "TESTING"; try { SmtpClient sc = new SmtpClient("lookman"); sc.Send(msg); } catch (SmtpException smtpex) { Label1.Text = smtpex.Message.ToString(); } catch (Exception ex) { Label1.Text = ex.Message.ToString(); }

          M 1 Reply Last reply
          0
          • S saltcode

            SMTP Service is running. ailMessage msg = new MailMessage("sample@lookman","kapat_saltcode@yahoo.com"); msg.Body = "Did u receive this, if u did don't reply, just testing"; msg.Subject = "TESTING"; try { SmtpClient sc = new SmtpClient("lookman"); sc.Send(msg); } catch (SmtpException smtpex) { Label1.Text = smtpex.Message.ToString(); } catch (Exception ex) { Label1.Text = ex.Message.ToString(); }

            M Offline
            M Offline
            Marcus J Smith
            wrote on last edited by
            #5

            //create the mail message
            MailMessage mail = new MailMessage();

            //set the addresses
            mail.From = new MailAddress("me@mycompany.com");
            mail.To.Add("you@yourcompany.com");

            //set the content
            mail.Subject = "This is an email";
            mail.Body = "this is a sample body with html in it. This is bold This is blue";
            mail.IsBodyHtml = true;

            //send the message
            SmtpClient smtp = new SmtpClient("127.0.0.1");
            smtp.Send(mail);

            That is from the link I provided. Does that shed any light on the subject?


            CleaKO

            "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
            "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

            1 Reply Last reply
            0
            • S saltcode

              Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help! System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28 Thanks in Advance

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #6

              http://lavanyadeepak.blogspot.com/2007/03/comprehensive-email-troubleshooting.html[^]

              Vasudevan Deepak Kumar Personal Homepage Tech Gossips

              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