Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Where’s GetMessageRawData As String? Post ReplyPost New Topic
Message << Prev Topic | Next Topic >>

Joined: 09 July 2022
Location: United Kingdom
Online Status: Offline
Posts: 9
Posted: 10 July 2022 at 3:50am | IP Logged Quote sarahmcjj

Just like RawHeader property, I need to show the full source of current message without saving it to the disc, so where's the MessageRawData As String?
Back to Top View sarahmcjj's Profile Search for other posts by sarahmcjj
AfterLogic Support
AfterLogic Support

Joined: 19 November 2003
Online Status: Offline
Posts: 2204
Posted: 11 July 2022 at 1:06am | IP Logged Quote Alex

bytes = msg.GetMessageRawData();
str = Encoding.GetEncoding(1252).GetString(bytes);

1252 encoding works best for converting bytes to string.

Please note that the string can appear huge. It's not recommended to process such large amount of data as strings (that's why no built-in method to get the message source as a string). Much better to keep it as bytes.

Back to Top View Alex's Profile Search for other posts by Alex

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide