How do I send an email using Outlook Express

I am relatively new to VB.NET programming, so the answer to my question may require some detail code.
I want to send an email to many recipients whose addresses are in a list box.
I wish to supply the subject and body of the email from text fields.
If I need to import files I need to know which ones.
I am using the first release of Visual Studio.Net Enterprise Edition.
I have searched this data base with poor results.
Thanks
Harold
Harold_LominacAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

iboutchkineCommented:
   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.send_via_0("test subject", "iboutchkine@bla.com", "Hi Iouri", "Outlook")
    End Sub
   
 Private Sub send_via_0(ByVal subject As String, ByVal toe As String, ByVal body As String, ByVal from As String)
        Dim Appl As Object
        Dim out As Object
        Try
            Appl = CreateObject("Outlook.Application")
            out = Appl.CreateItem(0)
            With out
                .Subject = subject
                .To = toe
                .Body = body
                '==============================================
                'to use html in the email instead of plain text
                'use .HTMLBody instead of .body
                '==============================================
                .Send()
            End With
        Catch ex As Exception
            MsgBox("Error " & Err.Number & ": " & ex.Message, MsgBoxStyle.Critical, "Error")
        End Try
    End Sub

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Harold_LominacAuthor Commented:
Thanks for your quick reply.  It seems straight forward, but I haven't tried it yet.  
You show "from" as "Outlook"  Would it be "Outlook Express" for Outlook Express?
Also I learned my client uses AOL.  How would I write code for that, set from to AOL?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.