Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi, i need to send many email at once in one click on vb.net, but i don't know how to do that...
simply, i thought like this...
if there is a list of email address in a datagridview..

List :
a@domain.com
b@domain.com
c@domain.com
d@domain.com
e@domain.com

So, I just think that I can use looping as much as Row Count in that datagrid,
and sending the email message for each address in that list...
I think's it's not effective if it's have 100 row count, and i believe there is another way to do that..
but, I can't find out how to do that.. Please, anybody can help me ??
Posted
Updated 22-May-12 15:32pm
v3
Comments
zhi-master 23-May-12 13:56pm    
Thanks for your solution :)

1 solution

this is the code

in mail.to.add( mail1@aa.com, mail2@bb.com.........)

VB
Dim strBody As String 
        Dim SmtpServer As New SmtpClient()
        Dim mail As New System.Net.Mail.MailMessage
        SmtpServer.Credentials = New Net.NetworkCredential()
        SmtpServer.Port = 25
        SmtpServer.Host = 
        mail = New System.Net.Mail.MailMessage
        mail.From = New MailAddress()
        mail.To.Add()
        mail.CC.Add()
        mail.Bcc.Add()
        mail.Subject = 
        strBody = 

VB
mail.Body = strBody

       SmtpServer.Send(mail)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900