Results 1 to 6 of 6

Thread: email smtp

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2008
    Posts
    42

    email smtp

    i have got error message when i debugging it,,
    ERROR message : Nullreferenceexception
    what is wrong with my code??

    my code:


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim message As New EmailMessage
    message.Subject = "test email"
    message.BodyText = " test done"

    Dim client As New Recipient("ABC", "[email protected]")
    message.To.Add(client)
    Dim emailsession As New OutlookSession
    emailsession.EmailAccounts("Gmail").Send(message)'<<<error here
    MsgBox("email sent")


    End Sub
    Last edited by husky_doggy; Dec 1st, 2008 at 01:54 PM.

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