Outlook Interop Send Message from Account -


OK, the glasses have changed somewhat on this, maybe someone can help me with this new problem.

Manually, what the user is doing is opening a new message in Outlook (now in 2007) in which the "From ..." field is open, they open it, a fixed address from the Global Address List Select the account, and send messages from that account.

Is this possible?

I have an address directory from such a global address list:

  address list list = null; Foreach (The address list address _outlookApp.Session.AddressLists in the list) {if (addressList.Name.ToLower (.) Equals ("Global Address List")) {list = addressList; break; }} If (list! = Null) {AddressEntry entry = null; Foreach (Entry in the Address Entry Address List.Edress Entry) {if (addressindri.net.net toover) .babbar ("Outgoing Mail Account") {entry = addressEntry; break; }}}  

But I'm not sure I can create an account type with an entry. It seems as if manually, when they choose the address to send, how can I mirror it in the interop?

Thank you!

(My Basic Question):

I have developed a small program to send emails using Outlook 2007 Interop client requires that the mail be transferred to the default account Will not be used - they had a secondary account that they used.

There is no problem - I have used the Microsoft.Office.Interop.Outlook.Account class to access availabled accounts, and choose the right one.

Now, it has come to know that they need it to work in Outlook 2003. Of course, the account class is not present in Outlook Interop 11.0.

How can I get the same thing with Outlook 2003?

Thanks in advance.

Ah ... It seems that I answer more questions on my stack overflow. .

Anyway, how it is done:

(I think this Outlook Interp works for 2003 and 2007, and does not use redemption. Also, how this part of redemption works, though I have not noticed it.)

  message.PropertyAccessor.SetProperty ("http://schemas.microsoft.com / Mapi / proptag / 0x00410102 ", messa Ge.PropertyAccessor.StringToBinary (entry.ID));  

This schema entry and hex identifier is related to the MAPI property PR_SENT_REPRESENTING_ENTRYID The question 'entry' variable was acquired in the code snippet.

The piece has found a lot through the web to search for that work. It was found that I had to use PR_SENT_REPRESENTING_ENTRYID property in one place, the fact is 0x00410102 == PR_SENT_REPRESENTING_ENTRYID Another fact in the second is that you have to call 'stringtoobbury'? ... do not even ask ... :) Thanks everyone who has posted all the pieces!


Comments