G
Guest
Hey i am a total newbie in .net.I'm working on an assignment to send email to
the adimin id that's my official id ([email protected] - the code
developers id) when an invalid user trys to login to the application.I have
to connect to my comapy's server to send emails.In the code when i give the
mailserver as local host the message gets stored in my queues folder.If i
giver the ip address of the server i want to connect to server unreachable
error keeps coming.I dont know if it is due to authentication issues or SMTP
configuration or GOD knows what else Here's the code:
msgMail.To = "(e-mail address removed)"
msgMail.From = "(e-mail address removed)"
msgMail.Subject = "Notification on Invalid User Login into
System"
msgMail.BodyFormat = MailFormat.Html
strBody = "<html><body><b>Invaild User
Login</b></body></html>"
msgMail.Body = strBody
SmtpMail.SmtpServer = "192.168.23.240"
SmtpMail.Send(msgMail)
Response.Write("Email was qued to disk")
error:
Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.
Well anydody out there with a solution coz i'm in a fix i've spent a whole
day trying to fix this and i'm desperate...............
the adimin id that's my official id ([email protected] - the code
developers id) when an invalid user trys to login to the application.I have
to connect to my comapy's server to send emails.In the code when i give the
mailserver as local host the message gets stored in my queues folder.If i
giver the ip address of the server i want to connect to server unreachable
error keeps coming.I dont know if it is due to authentication issues or SMTP
configuration or GOD knows what else Here's the code:
msgMail.To = "(e-mail address removed)"
msgMail.From = "(e-mail address removed)"
msgMail.Subject = "Notification on Invalid User Login into
System"
msgMail.BodyFormat = MailFormat.Html
strBody = "<html><body><b>Invaild User
Login</b></body></html>"
msgMail.Body = strBody
SmtpMail.SmtpServer = "192.168.23.240"
SmtpMail.Send(msgMail)
Response.Write("Email was qued to disk")
error:
Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.
Well anydody out there with a solution coz i'm in a fix i've spent a whole
day trying to fix this and i'm desperate...............