D
desais
I am using the cdo.dll to send out emails in C#. But instead of
connecting to my local smtp to forward the email I am changing the smtp
server to the recipients server for each email. This works just fine in
all of the tests that I have done. The issue I am having though is that
although the thread that handles mailing a group of emails with cdo is
closed and everything in the thread is disposed, the connection stays
established. When I check netstat the connection to the remote mail
servers is only closed once my main application is closed. This
behavior would be fine if cdo was just connecting to a single local
smtp server, but doesn't work for my situation. Does anyone know a way
to get cdo to close the connection once mail has been sent? I'm not
really sure if the connection is actually even open, just that it stays
listed in netstat as open until the main app is closed. I am also
trying to avoid using cdo alternative packages, but that would be a
worst case scenario. I'm also not sure if this is a .Net/C# issue
where the cdo object is not being correctly disposed after its thread
is aborted or a cdo issue.
connecting to my local smtp to forward the email I am changing the smtp
server to the recipients server for each email. This works just fine in
all of the tests that I have done. The issue I am having though is that
although the thread that handles mailing a group of emails with cdo is
closed and everything in the thread is disposed, the connection stays
established. When I check netstat the connection to the remote mail
servers is only closed once my main application is closed. This
behavior would be fine if cdo was just connecting to a single local
smtp server, but doesn't work for my situation. Does anyone know a way
to get cdo to close the connection once mail has been sent? I'm not
really sure if the connection is actually even open, just that it stays
listed in netstat as open until the main app is closed. I am also
trying to avoid using cdo alternative packages, but that would be a
worst case scenario. I'm also not sure if this is a .Net/C# issue
where the cdo object is not being correctly disposed after its thread
is aborted or a cdo issue.