0
VPS windows 2012에서 메일을 보내려고했습니다. & 원격 메일 서버를 사용하는 IIS 8 서버에서 메일을 보낼 수 없으며 오류가 발생했습니다.'System.Net.Mail.SmtpException : 원격 메일 서버에서 메일을 보내지 못했습니다.
send Faild - System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to respond <Ip Address> at System.Net.Sockets.Socket.DoConnect(EndPoint
endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6,
Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, 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) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of
inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at WebApplication1.Default.Page_Load(Object sender, EventArgs e)
코드는 VPS에서 텔넷 SMTP 서버에
<%
Dim Email As New System.Net.Mail.MailMessage(_"[email protected]", "[email protected]")
Email.Subject = "test subject"
Email.Body = "this is a test"
Dim mailClient As New System.Net.Mail.SmtpClient()
'This object stores the authentication values
Dim basicAuthenticationInfo As _
New System.Net.NetworkCredential("username", "password")
mailClient.Host = "host"
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo
mailClient.Send(Email)
%>
갱신
하지 수를 사용하지만, 지역 시스템에서의 수.
가 많은 이유가 될 수 마지막으로 실제 SMTP 서버에 연결하는 응용 프로그램을 중지하는 방법으로 점점 더 스팸 방지가 없습니다 확인 이. SMTP 요청을 차단할 수있는 방화벽이 뒤에 있습니까? 주소가 맞습니까? –
SMTP 서버에 연결할 수 없다고 생각합니다. 방화벽 또는 바이러스 백신 소프트웨어 일 수 있습니다. 방화벽 및 바이러스 백신 소프트웨어에서 허용해야합니다. –
방화벽이 꺼져 있어도 작동하지 않는 경우 로컬 서버에서 제대로 작동합니다. – sarath009