Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


email problem (with gmail email)

jeffmanjeffman Member Posts: 112
i have a email problem in my program will someone with this problem i want to send a email with tls enabled and with credentials (example: username and password) but it gives me this error message: failure sending mail on general exception error and the first innner exception error "unable to connect to the remote server". the second inner exception is: "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". heres my code can anyone help me:
Dim email As New MailMessage("", "", "Execution Manager Consumer Problem:" + TxtProblemName.Text + "Dont delete!", TxtProblemDesc.Text)
Dim client As New SmtpClient("", 465)
client.DeliveryMethod = SmtpDeliveryMethod.Network
Dim credentials As Net.NetworkCredential = New Net.NetworkCredential("", "computergeek")
client.UseDefaultCredentials = False
client.Credentials = credentials
client.EnableSsl = True

' The userState can be any object that allows your callback
' method to identify this send operation.
' For this example, the userToken is a string constant.
'Dim userstate As String = "test message1"
'client.SendAsync(email, userstate)
'Console.WriteLine("Sending message... press c to cancel mail. Press any other key to exit.")
thanks for any help again, jeffman
Sign In or Register to comment.