Hello,
Have you checked to see if you have any open connections that were not shut down properly? If a connection is attempting to read or write to the socket it may consume the processor.
The code you have will work for simple task with the SMTP Protocol but you may want to keep in mind the future use of your application. A lot of SMTP Servers require authentication, especially using extended protocol commands.
It might be worthwile for you to use a third party ActiveX component. They generally have a high return on investment considering the time you fight this and other issues costs much more than the money to purchase someone elses work.
I, although biased, suggest using SMTP Wizard by Seekford Solutions, Inc.
http://www.SeekfordSolutions.comThat control has a lot of features and an easy to use object model.
There are also other products out there that may work for your situation.
Good luck!
Brian
Brian Seekford
Seekford Solutions, Inc.http://www.SeekfordSolutions.comInternet ActiveX Controls and .NET Class Libraries.
SMTP/S FTP POP3/S HTTP/S SNTP MIME PING WHOIS TRACEROUTE NNTP DNS MX
Base64, UUEncode, yEnc, MD5, SHA1, URL, Quoted-Printable.
Resizer and Tooltips
Email Verification and more. Check us out!