View Single Post
  #4  
Old April 24th 08, 07:22 PM posted to microsoft.public.outlook.program_addins,microsoft.public.developer.outlook.addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Automatically sending and tracking encrypted e-mails. How?

As far as #1 goes, if you use .NET mail classes that has nothing to do with
Outlook and is better addressed somewhere else. I have no idea about that
stuff. Executing a CommandBarButton for encryption is about the only way to
do that in code using Outlook, but you previously said that you were willing
to let the users do it manually. So either way.

I don't think that bounces is any realistic way to go. You cannot rely on
that. I have my server set not to send bounce messages and a lot of Exchange
admins I know also set their servers that way. So totally unreliable is how
I'd describe that. You also said earlier that you were only sending emails
internally so what do Internet bounce messages have to do with that? Use the
property I mentioned to earlier.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Bila" wrote in message
...
Hi,

thank you for your reply.

Now to clarify the problems a bit more.

1. Mail encryption and sending:

So now it's clear that encryption can not be enabled programmaticaly
when using MailItem objects but only by displaying the corresponding
Inspector object and then "pushing" the "Encrypt Message" button. Too
bad.
I have chosen a different route by using X509Certificate2 class object
for certificate handling, System.Net.Mail.MailMessage for e-mail
composition and System.Net.Mail.SmtpClient for e-mail sending. Is
there any other way to do this task, preferably one that is more bound
to Outlook so that I can work within Outlook user context instead of
explicitly doing user authentication and credentials management (which
is required for SmtpClient class)?

2. Tracking the delivery status of sent mails

As far as I have out by reading various texts on the web, the only way
to do this is by checking bounce mails, that is report mails.
Current work flow is that after I send all the mails, after a certain
period of time I scan the Inbox to check for report mails by using
ReportItem class (Microsoft.Office.Interop.Outlook). Problem here is
how to bind a sent mail with a corresponding report. A simple idea is
to place a unique ID in the Subject of the sent mail which can later
be used to match it with the subject of the report mail. Is there any
other way of accomplishing this, one that is more elegant and not so
verbose?
Another issue is how to distinguish the type of the ReportItem to know
what exactly happened (Read, Delivered, Undeliverable)? I used the
OutlookSpy tool with "IMessage-GetRecipientTable" to inspect
different ReportItem objects and noticed that they differ in certain
MAPI tags they contain. For example, undelivered mail reports have
PR_NDR_XXX tags while the ones for delivered mails don't have them but
do have PR_DELIVER_TIME. Is this sufficient to distinguish different
ReportItem types (I do not want to parse the content)? If so, how can
I extract those tags programatically (using Redemption, CDO or
whatever else)?

I apologize if my questions seem weird or sensless but this is my
first contact with MAPI/Outlook/SMTP and mailing techologies in
general so I'm just trying however I can to solve the task assigned to
me.

Thanks once again.

Regards,
Mario Bilic


Ads