Results 1 to 6 of 6

Thread: [2005] Smtp Mail

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    [2005] Smtp Mail

    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

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [2005] Smtp Mail

    GMail is a web-based email, not an SMTP service.

    edit: I guess you can use it though
    Last edited by penagate; Aug 26th, 2006 at 11:37 AM.

  3. #3
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Re: [2005] Smtp Mail

    You can use Gmail as your outgoing SMTP server...

    see the post

    HERE
    If you find my thread helpful, please remember to rate me

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    Re: [2005] Smtp Mail

    Hi,

    To: dinosaur_uk

    Your post at: http://www.vbforums.com/showthread.php?t=422762 #13

    Is excellent and it's working OK

    If I'll give the program that I'll build to a friend, can he send me an e-mail from his computer?

    He will enter only:
    His e-mail
    Subject
    Body

    Thanks in advance

  5. #5
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Re: [2005] Smtp Mail

    As long as your password and your username is in there, it should be able to send from anywhere....it is ISP dependent...PROVIDED that your isp does not block port number 587...
    If you find my thread helpful, please remember to rate me

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224

    Re: [2005] Smtp Mail

    Hi,

    Thank you, you help me a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width