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.
 
Time out error will be caused when the Network Connection is slow or not
there
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top