View Single Post
  #1 (permalink)  
Old March 5th, 2006, 12:11 AM
peterasimpson peterasimpson is offline
Authorized User
 
Join Date: Nov 2005
Location: , , United Kingdom.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Bcc email addresses

I'm having a huge problem with the following . I've written a package which people seem to like. I have had a couple of requests to ad a customers email mailshot. The problem is that every time I write the routine the Bcc only sends the 1st email address in the list and that is it. Here is my code in VB 2005.

Imports System.Net.Mail

        Dim SendFrom As MailAddress = New MailAddress(TxtFrom.Text)
        Dim SendTo As MailAddress = New MailAddress(TxtTo.Text)
        Dim SendBcc As MailAddress = New MailAddress(Emails)

        Dim Message As MailMessage = New MailMessage(SendFrom)

        Message.Bcc.Add(SendBcc)

        Message.Subject = TxtSubject.Text
        Message.Body = TxtBody.Text

        Dim EmailClient As New SmtpClient("smtp.blueyonder.co.uk")
        EmailClient.Send(Message)

Everything works great but the 'SendBcc' will only send to the 1st email in the list. For example if the following was my list "peter@1234.com, peter@5678.com, peter@abcd.com" it will only send to peter@1234.com.

Thanks
Pete*
__________________
Simplicity is the key
Reply With Quote