send mail in vb 2008 with autentication

Posted on 2009-04-02
Last Modified: 2013-11-30
I'm using this code:
See code


Im' reciving:
+System.Net.Mail.SmtpException      5.7.3 Requested action aborted; user not authenticated"}      System.Net.Mail.SmtpException


            Dim Message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()

            Dim Smtp As New System.Net.Mail.SmtpClient()

            Dim SmtpUser As New System.Net.NetworkCredential()

            '-- Build Message

            Message.From = New System.Net.Mail.MailAddress("", "My name")

            Message.To.Add(New System.Net.Mail.MailAddress("", "Other Name"))

            Message.IsBodyHtml = False

            Message.Subject = "Come on My Show Soon"

            Message.Body = "Please be a guest on my show. - Larry"

            '-- Define Authenticated User

            SmtpUser.UserName = "" 

            SmtpUser.Password = "Password"

            SmtpUser.Domain = ""

            '-- Send Message

            Smtp.UseDefaultCredentials = False

            Smtp.Credentials = SmtpUser

            Smtp.Host = ""

            Smtp.EnableSsl = True

            Smtp.Port = 25

            Smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network



        Catch ex As Exception


        End Try

Open in new window

Question by:cpx_Support

Accepted Solution

Dgleich earned 500 total points
ID: 24052402
Hmm Try this code:

Just change it to use diffrent smtp server...
        Dim message As System.Net.Mail.MailMessage

        Dim smtp As New System.Net.Mail.SmtpClient("", 587)

        smtp.Credentials = New System.Net.NetworkCredential("Your gmail username", "password")

        message = New System.Net.Mail.MailMessage("From:", "To:", "Subject", "mail here")

        smtp.EnableSsl = True


Open in new window

LVL 69

Expert Comment

by:Éric Moreau
ID: 24052882
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24053001
Last I heard, Hotmail (and I assume Live as well) didn't have a public interface to send email through code. Because it's web-based, you have to go through browser. I'd love to know otherwise.

Author Comment

ID: 24057225
Hello emoreau i looked the link but I think i'm using the correct configuration but doen't work.

Kaufmed, I read that Hotmail now let users send mail throug smtp but in any case I tried with gmail and I'm getting the same error.

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013.  There was huge research been done and found solution for the duplicate mails. Especially when the user gets  duplicate mails.
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now