That's a good approach, but you don't want to have too many concurrent SMTP sessions, for several reasons :
- You will exhaust your system resources if you create tens or hundreds of threads through SmtpClient.SendAsync(). The MSDN documentation for SendAsync doesn't state explicitly that one thread is created per call, but it tells that you can't call SendAsync until the previous call is completed. This sounds like the class spawns its own thread :
"After calling SendAsync, you must wait for the e-mail transmission to complete before attempting to send another e-mail message using Send or SendAsync."
- Having many simultaneous connections coming from the same IP address is a typical spammer behaviour. Most mailservers limit the number of simultaneous connections coming from the same IP address, and may eventually blacklist the address. If you have control over the destination SMTP server, this issue could be work around by disabling limits for your IP address.
- If you send too many messages too quickly, and that your IP address is not whitelisted by the targeted mail server, the latter may willingly slow you down to save resources for other SMTP clients. This technique is called "tarpiting". The server usually limits the number of messages received per second from a given IP. If this happens, increasing the number of threads won't make any difference, you'll have to talk to the mail server admin so that he whitelists your ip address, or increase limits.