|
Failure sending mail.
System.Net.Mail.SmtpException was unhandled by user code
Message="Failure sending mail."
Source="System"
StackTrace:
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at gfln1.ViewCompany1.Button1_Click(Object sender, EventArgs e) in C:\Users\Iram\Documents\Visual Studio 2008\Projects\gfln1\gfln1\ViewCompany1.aspx.vb:line 108
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.Net.WebException
Message="Unable to connect to the remote server"
Source="System"
StackTrace:
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)
InnerException: System.Net.Sockets.SocketException
ErrorCode=10061
Message="No connection could be made because the target machine actively refused it 2001:0:4137:9e76:3808:bd63:4b4d:74f7:25"
NativeErrorCode=10061
Source="System"
StackTrace:
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)
InnerException:
erum mirzaPosted Jan 6, 2011, 2:19 AM
Subhendu DePosted Jan 6, 2011, 2:17 AM
Be sure if the port is open and no firewall rules block the port.
ShankeyPosted Jan 6, 2011, 2:10 AM
Please have a look at following links
http://jalpesh.blogspot.com/2009/07/sending-email-through.html
http://forums.asp.net/p/1327405/3743484.aspx
erum mirzaPosted Jan 6, 2011, 1:52 AM
Pinging 174.133.41.130 with 32 bytes of data:
Reply from 174.133.41.130: bytes=32 time=277ms TTL=111
Reply from 174.133.41.130: bytes=32 time=291ms TTL=111
Request timed out.
Reply from 174.133.41.130: bytes=32 time=278ms TTL=111
Ping statistics for 174.133.41.130:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 277ms, Maximum = 291ms, Average = 282ms
erum mirzaPosted Jan 6, 2011, 1:44 AM
Subhendu DePosted Jan 6, 2011, 1:41 AM
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 2001:0:4137:9e76:3808:bd63:4b4d:74f7:25"
NativeErrorCode=10061
Be sure the SMTP server is accessible from your machine. Try pinging the smtp server from your machine and check if connectivity works between them or not.
Krishna GaradPosted Jan 6, 2011, 1:40 AM
http://www.c-sharpcorner.com/UploadFile/prathore/2464/Default.aspx