Reputation: 755
I make a client application with vb.net, and i want to send emails to many recipients simultaneously. I know how to send one email, but i don't know how to send many of them. What i should to do, create many smtpclient objects or send them with a thread?
Upvotes: 0
Views: 202
Reputation: 17673
send them with using threading capability.
creating using many smtpclient objects takes many resourcec & this can be reason for low performance .
hence it is better to use threading facility with help of queue, take some job at a time from queue & process them
Dim t As New Threading.Thread(New Threading.ParameterizedThreadStart(AddressOf SendEmails))
t.Start(emailThread)
Upvotes: 1
Reputation: 1827
If you simply want to send one email to many people, separate the list of people to send to with semicolons. Eg:
Send("me@me.com", "you@you.com; someone@else.com; h@i.com", "Hi!", "Hi there guys!")
Also, what is the importance of sending all of the emails at the exact same time? Is it OK if they are sent a second after each other?
Upvotes: 2