Setting properties of MapiMessage

Sorry, SH. None of the methods below will produce a value in the FROM field of my saved out MapiMessage.

------------------
byte[] bytes;
MapiProperty property;

bytes = Encoding.Unicode.GetBytes(displayname);
property = new MapiProperty(MapiPropertyTag.PR_ORIGINAL_SENDER_NAME, bytes);
msg.SetProperty(property);
bytes = Encoding.Unicode.GetBytes(address);
property = new MapiProperty(MapiPropertyTag.PR_ORIGINAL_SENDER_EMAIL_ADDRESS, bytes);
msg.SetProperty(property);

bytes = Encoding.Unicode.GetBytes(displayname);
property = new MapiProperty(2147483679, bytes);
msg.SetProperty(property);
bytes = Encoding.Unicode.GetBytes(address);
property = new MapiProperty(2147549215, bytes);
msg.SetProperty(property);

msg.Recipients.Add(address, displayname, MapiRecipientType.MAPI_ORIG);

msg.Headers.Add(“From”, sender);

msg.SenderEmailAddress = sender;
-------------------

SH, these MAPI properties work!

byte[] bytes;
MapiProperty property;
bytes = Encoding.Unicode.GetBytes(displayname);
property = new MapiProperty(MapiPropertyTag.PR_SENDER_NAME, bytes);
msg.SetProperty(property);
bytes = Encoding.Unicode.GetBytes(address);
property = new MapiProperty(MapiPropertyTag.PR_SENDER_EMAIL_ADDRESS, bytes);
msg.SetProperty(property);

Are there any other MAPI properties or MapiMessage fields that you recommend us to set, so Outlook will happily our saved messages?

So far, I am setting these properties:
MapiPropertyTag.PR_ABSTRACT
MapiPropertyTag.PR_CONVERSATION_INDEX
MapiPropertyTag.PR_CONVERSATION_TOPIC
MapiPropertyTag.PR_CREATOR_NAME
MapiPropertyTag.PR_INTERNET_MESSAGE_ID
MapiPropertyTag.PR_SUBJECT
MapiPropertyTag.PR_HASATTACH
MapiPropertyTag.PR_READ_RECEIPT_REQUESTED
MapiPropertyTag.PR_CREATION_TIME
MapiPropertyTag.PR_CLIENT_SUBMIT_TIME
MapiPropertyTag.PR_LAST_ACCESS_TIME
MapiPropertyTag.PR_LAST_MODIFICATION_TIME
MapiPropertyTag.PR_MESSAGE_DELIVERY_TIME
MapiPropertyTag.PR_IMPORTANCE
MapiPropertyTag.PR_SENSITIVITY
MapiPropertyTag.PR_MESSAGE_SIZE
MapiPropertyTag.PR_MESSAGE_CLASS
MapiPropertyTag.PR_SENDER_NAME
MapiPropertyTag.PR_SENDER_EMAIL_ADDRESS
MapiPropertyTag.PR_ORIGINAL_SENDER_NAME
MapiPropertyTag.PR_ORIGINAL_SENDER_EMAIL_ADDRESS
msg.Recipients
msg.Subject
msg.SetBodyContent()
msg.Attachments
MapiMessageFlags.MSGFLAG_UNMODIFIED
MapiMessageFlags.MSGFLAG_READ
if (sentDate <= DateTime.MinValue) msg.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT);

Are there any other properties or fields you recommend us to set? Maybe we are missing some information? Maybe there are properties or fields that you guys set that I am forgetting?

The issues you have found earlier (filed as NETWORKNET-33236) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
occorled:
SH, these MAPI properties work!

byte[] bytes;
MapiProperty property;
bytes = Encoding.Unicode.GetBytes(displayname);
property = new MapiProperty(MapiPropertyTag.PR_SENDER_NAME, bytes);
msg.SetProperty(property);
bytes = Encoding.Unicode.GetBytes(address);
property = new MapiProperty(MapiPropertyTag.PR_SENDER_EMAIL_ADDRESS, bytes);
msg.SetProperty(property);

Hi
Thank you very much for sharing your knowledge and experience with us. Its our pleasure to interact with people like you. Keep on sharing.

Best Regards

occorled:
Are there any other MAPI properties or MapiMessage fields that you recommend us to set, so Outlook will happily our saved messages?

So far, I am setting these properties:
MapiPropertyTag.PR_ABSTRACT
MapiPropertyTag.PR_CONVERSATION_INDEX
.....
.....
.....

Are there any other properties or fields you recommend us to set? Maybe we are missing some information? Maybe there are properties or fields that you guys set that I am forgetting?

Hi

I have gone through the list and found that you are using almost all the important properties. However if some more useful options are found in future, I will try to notify you as well.

Best regards