View Single Post
  #3  
Old April 24th 08, 06:02 PM posted to microsoft.public.outlook.program_addins,microsoft.public.developer.outlook.addins
Bila
external usenet poster
 
Posts: 3
Default Automatically sending and tracking encrypted e-mails. How?

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

On Apr 24, 3:16 pm, "Ken Slovak - [MVP - Outlook]"
wrote:
You can't really force signing or encrypting using code, but you can set the
OriginatorDeliveryReportRequested property of a MailItem to force sending
delivery notices.

Other than that I'm not sure what you're asking for.

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

"Bila" wrote in message

...

Ads