G
Guest
Below is my code, and is just blocked there. There is no any error message.
'=============================================>
Dim msg As String = "---"
Try
Dim strFrom As String = "(e-mail address removed)"
Dim sm As New SmtpClient(Host, Port)
With sm
.EnableSsl = True
.Credentials = New NetworkCredential("MyuserName", "MyPass")
End With
Dim _from As MailAddress = New MailAddress(str)
Dim _to As MailAddress = New MailAddress(str)
Dim mMsg As New MailMessage(_from, _to)
mMsg.Subject = "Happy AAA"
'mMsg.SubjectEncoding = System.Text.Encoding.UTF8
sm.Send(mMsg)
msg = "Seccess!"
Catch ex As Exception
msg = ex.Message
End Try
TextBox1.Text = msg
'<<=================================================
Thanks for any suggestion.
'=============================================>
Dim msg As String = "---"
Try
Dim strFrom As String = "(e-mail address removed)"
Dim sm As New SmtpClient(Host, Port)
With sm
.EnableSsl = True
.Credentials = New NetworkCredential("MyuserName", "MyPass")
End With
Dim _from As MailAddress = New MailAddress(str)
Dim _to As MailAddress = New MailAddress(str)
Dim mMsg As New MailMessage(_from, _to)
mMsg.Subject = "Happy AAA"
'mMsg.SubjectEncoding = System.Text.Encoding.UTF8
sm.Send(mMsg)
msg = "Seccess!"
Catch ex As Exception
msg = ex.Message
End Try
TextBox1.Text = msg
'<<=================================================
Thanks for any suggestion.