Results 1 to 4 of 4

Thread: [RESOLVED] send Email with SMTP autentication

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    285

    Resolved [RESOLVED] send Email with SMTP autentication

    How can I send an Email with VB.2008, is the SMTP server needs autentication???

    I can do it without autentication, mas with that, it doesnt work

  2. #2
    Lively Member
    Join Date
    Oct 2007
    Posts
    104

    Re: send Email with SMTP autentication

    post code and we will give you some help
    Report your software freeware, it's free

    http://intotheapp.blogspot.com

    a blog with only free software

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    285

    Re: send Email with SMTP autentication

    I use this code:

    Code:
        Dim EmailServer As New System.Net.Mail.SmtpClient("smtp.gmail.com")
        Dim myMessage As New System.Net.Mail.MailMessage("[email protected]", "[email protected]", "Subject", "Main msg")
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            EmailServer.Send(myMessage)
            MsgBox("ok")
        End Sub
    The question is:
    The server SMTP I wanna use need SMTP autentication,

    I can I give them?

    Thank You

  4. #4
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: send Email with SMTP autentication

    Code:
            Dim credentials As New Net.NetworkCredential("username", "password")
            EmailServer.Credentials = credentials

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