MapiMessage set properties

Hello
Dim MapiMessage As New MapiMessage
MapiMessage.Date = Date.Now
MapiMessage.SetBodyContent(htm content, BodyContentType.Html, False)

How to set the MapiMessage Date?

And set these 3 message flags?
MSGFLAG_READ
MSGFLAG_UNSENT
MSGFLAG_ASSOCIATED

And MapiMessage.SetBodyContent Html will not make the same result although html is very very simple

Thanks :slight_smile:

Sorry found here:
Working with MAPI Properties|Documentation (aspose.com)
Setting MAPI Properties

Can’t set the MapiMessage Date working :frowning:

True that MapiMessage has many properties that don’t have any match in RFC822 Eml MailMessage
But for general ones, just like you already have
MapiMessage.Subject = “blh subj”
MapiMessage.MessageClass = “IPM…”

Why not adding the most used ones to MapiMessage?
Like:

MapiMessage.Date = Date.Now
MapiMessage.XMailer = “xmail blah”

Seems not useful? :slight_smile:

@australian.dev.nerds,

MAPI has more date-related properties.

The most used ones you can set via the properties:

MapiMessage.DeliveryTime
MapiMessage.ClientSubmitTime

1 Like

Thanks, sorry didn’t find those, can you please advise about setting these 3 Mapi Message flags?
MSGFLAG_READ
MSGFLAG_UNSENT
MSGFLAG_ASSOCIATED

@australian.dev.nerds,

Please try the following:

' Set the message flags
msg.SetMessageFlags(MapiMessageFlags.MSGFLAG_ASSOCIATED Or MapiMessageFlags.MSGFLAG_READ Or MapiMessageFlags.MSGFLAG_UNSENT)