Hi,

I do not have an e-mail account from my internet service provider.

I have an e-mail account of gmail, and I want to send an e-mail from an application that I'll build with Microsoft Visual Basic 2005 Express Edition.

Example that not work:

VB Code:
  1. Imports System.Net.Mail
  2.  
  3.         Dim Mail As New System.Net.Mail.MailMessage
  4.  
  5.         With Mail
  6.             .To.Add("MailAddress")
  7.             .From = New MailAddress("MailAddress")
  8.             .Subject = "Some Subject"
  9.             .Body = "Some Body"
  10.         End With
  11.  
  12.         Dim smtp As New SmtpClient("smtp.gmail.com")
  13.  
  14.         smtp.Send(Mail)
  15.  
  16.         smtp = Nothing
  17.         Mail.Dispose()
  18.  
  19.         MessageBox.Show("Your message has been sent")
But if I have an e-mail account from my internet service provider and I'll change the line:

VB Code:
  1. Dim smtp As New SmtpClient("smtp.gmail.com")
  2. To:
  3.         Dim smtp As New SmtpClient("smtp.internet service provider")
Then the program is working OK

Can somebody help me or have suggestion or some example?

Thanks in advance