using visual basic express edition 2005
[code=vb]
Private Sub email1()
'server address
Dim client As New SmtpClient("ima p.aol.com")
'username and password
client.Credenti als = New Net.NetworkCred ential("xxxxx", "xxx")
Dim mm As New MailMessage("xx x@xxx.com", "xxx@xxx.co m")
'Set Subject
mm.Subject = "Test"
'set message
mm.Body = "test123"
'html???
mm.IsBodyHtml = True
'send email
Try
client.Send(mm)
'give error if any
Catch ex As Exception
'error message
MessageBox.Show (ex.ToString)
End Try
End Sub
[/code]
this gets the the last part ' client.send(mm) then freezes and stops responding...
Is there anything missing?
Thanks
[code=vb]
Private Sub email1()
'server address
Dim client As New SmtpClient("ima p.aol.com")
'username and password
client.Credenti als = New Net.NetworkCred ential("xxxxx", "xxx")
Dim mm As New MailMessage("xx x@xxx.com", "xxx@xxx.co m")
'Set Subject
mm.Subject = "Test"
'set message
mm.Body = "test123"
'html???
mm.IsBodyHtml = True
'send email
Try
client.Send(mm)
'give error if any
Catch ex As Exception
'error message
MessageBox.Show (ex.ToString)
End Try
End Sub
[/code]
this gets the the last part ' client.send(mm) then freezes and stops responding...
Is there anything missing?
Thanks
Comment