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. problem with sending Emails.

problem with sending Emails.

Scheduled Pinned Locked Moved ASP.NET
csharphelpvisual-studiosysadmindocker
6 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.
  • K Offline
    K Offline
    kavitha_blueindia
    wrote on last edited by
    #1

    Hi all, I am getting following exception when i send Email.Please help. FailureSystem.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:25 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at Compose.SendButton_Click(Object sender, EventArgs e) in c:\Users\kavitha\Documents\Visual Studio 2008\WebSites\Message\Compose.aspx.cs:line 133 Thanks.

    C 1 Reply Last reply
    0
    • K kavitha_blueindia

      Hi all, I am getting following exception when i send Email.Please help. FailureSystem.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:25 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at Compose.SendButton_Click(Object sender, EventArgs e) in c:\Users\kavitha\Documents\Visual Studio 2008\WebSites\Message\Compose.aspx.cs:line 133 Thanks.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Fix your mail settings in your code to point to a real mail server and you will be fine.

      Christian Graus Driven to the arms of OSX by Vista.

      K 1 Reply Last reply
      0
      • C Christian Graus

        Fix your mail settings in your code to point to a real mail server and you will be fine.

        Christian Graus Driven to the arms of OSX by Vista.

        K Offline
        K Offline
        kavitha_blueindia
        wrote on last edited by
        #3

        what happens when i use IP address: "127.0.0.1", port no 25.can You please explain me? Thanks a lot

        N C 2 Replies Last reply
        0
        • K kavitha_blueindia

          what happens when i use IP address: "127.0.0.1", port no 25.can You please explain me? Thanks a lot

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Look up what the IP Address 127.0.0.1 is and you will have your answer. :sigh:


          only two letters away from being an asset

          1 Reply Last reply
          0
          • K kavitha_blueindia

            what happens when i use IP address: "127.0.0.1", port no 25.can You please explain me? Thanks a lot

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            you find out what happens when you copy code without understanding it, I guess. There's nothing wrong with googling for code, I spent the week doing that. But, once you find a snippet that says it will do what you want, you should read up and understand it so you can work on it if you need to.

            Christian Graus Driven to the arms of OSX by Vista.

            K 1 Reply Last reply
            0
            • C Christian Graus

              you find out what happens when you copy code without understanding it, I guess. There's nothing wrong with googling for code, I spent the week doing that. But, once you find a snippet that says it will do what you want, you should read up and understand it so you can work on it if you need to.

              Christian Graus Driven to the arms of OSX by Vista.

              K Offline
              K Offline
              kavitha_blueindia
              wrote on last edited by
              #6

              Hi all, I understand what my problem is.I think i need to find out smtp server which my company uses.I have used smtp.gmail.com along with my gmail credentials.It works fine.Thanks for all your suggestion. Thanks.

              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