MapiMessage.XMailer Property

Hello,
Can you please accept this feature request to add MapiMessage.XMailer property?
To conform with MailMessage, and also in case we load eml to MapiMessage.
Even if not used directly in mapi message itself, it can be used when saving: MapiMessage.Save
I’m sure XMailer property is a commonly used useful property.
Thanks :slight_smile:

Hello @australian.dev.nerds,

Have you considered the Headers property to get/set XMailer?

For example:

Dim msg As MapiMessage = MapiMessage.Load(fileName)
msg.Headers.[Set]("X-Mailer", "MyMailer")
Dim xMailer As String = msg.Headers("X-Mailer")

Thank you.

1 Like

Hello,
Not bad, but not always working properly!
And MapiMessage.XMailer is highly useful, almost every email SDK has it, even your MailMesage!

MyMapiMessage = MapiMessage.Load(MyMemoryStream, LoadOptionsXYZ)
MyMapiMessage.Headers.Set(“X-Mailer”, “blah”)
MyMapiMessage.Save…
MyMapiMessage.SaveAsTnef…
Sometimes will not work!

Thanks for your kind consideration :slight_smile:

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): EMAILNET-40935

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

Hello,
A sample project + sample .msg to load the message and save it as: Oft , Eml , Emlx , Mht , Tnef
You can see X-Mailer header is not saved in ANY of the target formats!
WindowsApplication22.zip (98.4 KB)

@australian.dev.nerds,

Thank you for the samples provided.

1 Like

Hello,
Still having issues with this. although claimed to be fixed in 23.3:

1st; mht does not get XMailer, but I guess that will depend on my most vital case, another case which was save as mht with all headers included, some kind of saving as eml with mht body to be able to have custom rendering! Am I right? If so, will wait for that feature…

2nd, still having problem when saving as .oft : run my sample again with the 23.3 dll:
WindowsApplication22.zip (98.4 KB)

Run to save as different formats and check the .oft one, use Aspose Email Net DetectFileFormat on it and you will find that it’s saved as MSG instead of OFT

Seems to be from SaveOptionsOFT() As Email.MsgSaveOptions
This line:
SaveOptionsOFT.SaveAsTemplate = True

Yeah, in this build 23.3 we’ve got this message:
Public Property SaveAsTemplate As Boolean is obsolete

But it’s gonna work for a while, not to break it immediately!
Specially when new usage is incomplete:
MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat)
Not possible to have the missing:
MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormatUnicode)

If there were a beta monthly build or I could get access to the monthly builds one or 2 days earlier, I could test and inform you of such issues in advance, saving another month of looong waiting :smiley:

Summary:

  • MsgSaveOptions.SaveAsTemplate = True won’t work as expected now

This means all users who get the 23.3 and use in their live products, will suffer from the issue, their output will be all msg instead of oft, even if SaveAsTemplate = True
If they save it with hardcoded .oft extension, their output will not match the inner format
No idea about your policy, but if it was me, I’d over release the fixed dlls with the same version number: 23.3 with no comments

And the final quick question: can be sure the easier to use MapiMessage.XMailer property won’t be there? :slight_smile:

@australian.dev.nerds,

MapiMessage properties reflect MAPI properties. It appears that there is no specific MAPI property for storing the X-Mailer header field.