I am trying to send an email to multiple recipients but unable to do that so far. My code is below:
Dim strFrom
As String =
"<abc@abc.com>"
Dim strSubject
As String =
"Test"
Dim MailMessage
As New MailMessage(strFrom,
abc@abc.com;xyz@xyz.com, strSubject, pMessage)
Dim emailClient
As New SmtpClient("mail.abc.com")
DC517 Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
knowledgist
Member
86 Points
135 Posts
How to send email to multiple recipients
Jul 20, 2007 10:37 AM|LINK
I am trying to send an email to multiple recipients but unable to do that so far. My code is below:
Dim strFrom As String = "<abc@abc.com>" Dim strSubject As String = "Test" Dim MailMessage As New MailMessage(strFrom, abc@abc.com;xyz@xyz.com, strSubject, pMessage) Dim emailClient As New SmtpClient("mail.abc.com")emailClient.Send(MailMessage)
d4dennis@ins...
Star
9229 Points
1314 Posts
Re: How to send email to multiple recipients
Jul 20, 2007 12:38 PM|LINK
Hi There.
Take a look at this tutorial, teach you how to send multiple emal at once.
http://www.aspnet101.com/aspnet101/tutorials.aspx?id=15
Hope this is help ;)
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
javiguillen
Contributor
2432 Points
526 Posts
Re: How to send email to multiple recipients
Jul 20, 2007 12:45 PM|LINK
you can add to the collection of recipients in the following way:
Dim MailMessage As New MailMessageMailMessage.From =
New MailAddress("test1@test.com") MailMessage.To.Add("test2@test.com")MailMessage.To.Add(
"test3@test.com")MailMessage.Subject =
"test"MailMessage.Body =
"test" Dim emailClient As New SmtpClient("mail.abc.com")emailClient.Send(MailMessage)
tuthanhhien
Member
10 Points
4 Posts
Re: How to send email to multiple recipients
Mar 28, 2008 07:15 PM|LINK
It works. Thanks.