J
Jonatan
Hi all,
I have started to use Redemption today and I am getting a problem that
is quite likely to be my fault!!
I just want to display the AddressBook select recipients and send the
email. For some reason the safeMailItem recipients list does not get
updated and the program fails with error 0x80004005.
I suppose that I do not need to loop through the returned list of
recipients and populate the recipients list of the SafeMailItem!!!
My code is the following
Outlook.MailItem mailItem = (Outlook.MailItem)
this.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
Redemption.SafeMailItem sMailItem = new
Redemption.SafeMailItem();
mailItem.Subject = "Hello";
sMailItem.Item = mailItem;
Redemption.MAPIUtils mapiUtils = new
Redemption.MAPIUtils();
Redemption.SafeRecipients recipients =
sMailItem.Recipients;
recipients = (Redemption.SafeRecipients)
mapiUtils.AddressBook(recipients, "Select Name", false, true, 3, "To",
"Cc", "Bcc", 0);
//This method displays 1 if I selected one recipient
MessageBox.Show("" + recipients.Count);
// This one displays always 0
MessageBox.Show("" + sMailItem.Recipients.Count);
// As a result when I send the item it fails because
there are no recipients
sMailItem.Send();
Thank you for your help
Jonatan
I have started to use Redemption today and I am getting a problem that
is quite likely to be my fault!!
I just want to display the AddressBook select recipients and send the
email. For some reason the safeMailItem recipients list does not get
updated and the program fails with error 0x80004005.
I suppose that I do not need to loop through the returned list of
recipients and populate the recipients list of the SafeMailItem!!!
My code is the following
Outlook.MailItem mailItem = (Outlook.MailItem)
this.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
Redemption.SafeMailItem sMailItem = new
Redemption.SafeMailItem();
mailItem.Subject = "Hello";
sMailItem.Item = mailItem;
Redemption.MAPIUtils mapiUtils = new
Redemption.MAPIUtils();
Redemption.SafeRecipients recipients =
sMailItem.Recipients;
recipients = (Redemption.SafeRecipients)
mapiUtils.AddressBook(recipients, "Select Name", false, true, 3, "To",
"Cc", "Bcc", 0);
//This method displays 1 if I selected one recipient
MessageBox.Show("" + recipients.Count);
// This one displays always 0
MessageBox.Show("" + sMailItem.Recipients.Count);
// As a result when I send the item it fails because
there are no recipients
sMailItem.Send();
Thank you for your help
Jonatan