Sending mail using Net.Mail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.
I tring to send a email.
I wrote the following lines:

(Imports System.Net.Mail)

Dim MailMsg As New MailMessage
Dim WithEvents MailSmtp As New SmtpClient
MailSmtp.Host = gmail.smtp.com
MailSmtp.Port = 465
MailSmtp.EnableSsl = True
MailSmtp.Credentials = New NetworkCredential([email protected]","MyPassword")
MailSmtp.Send(MailMsg)

And I resive this run-time error:
The operation has timed out

Thank you 4 all.
 
Thank you, but it's not the problam. because with an other Mail Server I can
sending mail to another E-Mail within this server.
Thanks.
 
Back
Top