471,617 Members | 1,112 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,617 software developers and data experts.

Using CDO to connect to remote SMTP servers

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.

Feb 3 '06 #1
2 1962
<de****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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.


The whole point of the email system is that it is fire and forget - you can
send an email even if the remote system is down - the email system just
tries again later. You have reduced it to a chat system by attempting to
send your emails directly.
Feb 3 '06 #2
The reason I am doing this is to detect hard bounces on a subset of our
emails. These emails would be leaving our circulation management
software with an xml header. The header from the email is stripped and
then the data is dumped into a db to track along with other vars, which
are included in the header. Also due to limitations in our CMS the from
address is also being changed based on header info. The email is also
flagged with a tracking id. Normally this subset of email would hit our
exchange server, which would then do the same direct connections to the
domain email servers anyway. I don't know of any free software that
would provide the flexibility we need. I also don't know of a way to
get exchange to immediately report hard bounces on only a subset of
emails.

Feb 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Visual Systems AB \(Martin Arvidsson\) | last post: by
14 posts views Thread by sridhar | last post: by
5 posts views Thread by darrel | last post: by
7 posts views Thread by oopsbabies | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.