Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

send multiple emails

Posted on 2011-10-28
1
Medium Priority
?
182 Views
Last Modified: 2012-05-12
   inside txtemail.Text I want to add more than 1 email     ie. gbarraza@mail.com;jhore@barra.com

Right now it only let me send 1 email.   How can I accomplish this?

__________code below_______________

  emailRecipients = txtemail.Text


 Dim objEmail As MailMessage = New MailMessage()
        Dim subjToUse As String = "Approved Application (For internal use only)"

        objEmail.To.Add(New MailAddress(emailRecipients))
        objEmail.CC.Add(New MailAddress("teckart@.com"))
        objEmail.From = New MailAddress("infocenter@.com")
        objEmail.Subject = subjToUse
        objEmail.Body = smsg
        objEmail.IsBodyHtml = True
        Dim client As SmtpClient = New SmtpClient("mail..com")
        client.Send(objEmail)
0
Comment
Question by:Wigging
1 Comment
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 37045033
as you can see in http://emoreau.com/Entries/Articles/2007/09/Using-SystemNetMail.aspx

    'able to handle more then a single recipient
    strAddresses = txtTo.Text.Replace(",", ";")
    For Each strX As String In strAddresses.Split(";"c)
        If strX.Trim.Length > 0 Then
            .To.Add(New MailAddress(strX))
        End If
    Next
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Integration Management Part 2
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

581 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