RISLA
asked on
SMTP via .NET program failure
I have a program that handles vacation/sick requests which was recently moved from Server 2003 (IIS 6) to a new Server 2008 (IIS 7.5)
The notification email for when a user requests absence is no longer functioning.
- It does however work for domain administrators!
I can ping and Telnet to the SMTP server which led me to believe it was a permission issue.
-I tried creating a new mailbox (Requests@domain) with everyone having full access permission
-I created a new receive connector allowing anonymous connection from the server IP
The program (SMTP Piece):
Dim email As New System.Net.Mail.MailMessag e()
Dim client As New SmtpClient
client.UseDefaultCredentia ls = False
client.Credentials = New System.Net.NetworkCredenti al("userna me", "password")
client.DeliveryMethod = SmtpDeliveryMethod.Network
client.Host = AppSettings("SmtpServer")
email.From = New MailAddress("username@doma in.com")
email.From = New MailAddress(AppSettings("E mailFrom") )
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --
This is the output if the user is not a domain admin:
[SocketException (0x277b): A system call has failed ***.***.***.***:25]
System.Net.Sockets.Socket. DoConnect( EndPoint endPointSnapshot, SocketAddress socketAddress) +273
System.Net.ServicePoint.Co nnectSocke tInternal( Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +584
[WebException: Unable to connect to the remote server]
System.Net.ServicePoint.Ge tConnectio n(PooledSt ream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6) +8593522
System.Net.PooledStream.Ac tivate(Obj ect owningObject, Boolean async, GeneralAsyncDelegate asyncCallback) +8593954
System.Net.ConnectionPool. GetConnect ion(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +3016971
System.Net.Mail.SmtpConnec tion.GetCo nnection(S ervicePoin t servicePoint) +286
System.Net.Mail.SmtpClient .Send(Mail Message message) +1500
[SmtpException: Failure sending mail.]
System.Net.Mail.SmtpClient .Send(Mail Message message) +2392407
GlobalFunctions.error_emai l(String txtst, String txtmsg, String user) in C:\inetpub\wwwroot\Intrane t\Requests \App_Code\ GlobalFunc tions.vb:1 14
_Default.btnSubmit_Click(O bject sender, EventArgs e) in C:\inetpub\wwwroot\Intrane t\Requests \Users\Use rs.aspx.vb :401
System.Web.UI.WebControls. Button.Rai sePostBack Event(Stri ng eventArgument) +155
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +3804
The notification email for when a user requests absence is no longer functioning.
- It does however work for domain administrators!
I can ping and Telnet to the SMTP server which led me to believe it was a permission issue.
-I tried creating a new mailbox (Requests@domain) with everyone having full access permission
-I created a new receive connector allowing anonymous connection from the server IP
The program (SMTP Piece):
Dim email As New System.Net.Mail.MailMessag
Dim client As New SmtpClient
client.UseDefaultCredentia
client.Credentials = New System.Net.NetworkCredenti
client.DeliveryMethod = SmtpDeliveryMethod.Network
client.Host = AppSettings("SmtpServer")
email.From = New MailAddress("username@doma
email.From = New MailAddress(AppSettings("E
--------------------------
This is the output if the user is not a domain admin:
[SocketException (0x277b): A system call has failed ***.***.***.***:25]
System.Net.Sockets.Socket.
System.Net.ServicePoint.Co
[WebException: Unable to connect to the remote server]
System.Net.ServicePoint.Ge
System.Net.PooledStream.Ac
System.Net.ConnectionPool.
System.Net.Mail.SmtpConnec
System.Net.Mail.SmtpClient
[SmtpException: Failure sending mail.]
System.Net.Mail.SmtpClient
GlobalFunctions.error_emai
_Default.btnSubmit_Click(O
System.Web.UI.WebControls.
System.Web.UI.Page.Process
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.