I think there should be an official way for Message to serialize it to a string, for example. There should also be a method that converts the serialized string back to a Message instance with the same content.
This feature can be useful when storing messages in a database and sending them through a queue.
The serialized Message should be without attachments (only a reference to the disk path, or omit completely) and be stored as a simple string including headers.
For example:
To: Jan <jan@barasek.com>
From: Nette <info@nette.org>
Subject: My awesome message!
<!-- HTML body -->
<p>Hello, how are you?</p>
Text content does not have to be included, because we can always calculate it from HTML.
Hello,
I think there should be an official way for Message to serialize it to a string, for example. There should also be a method that converts the serialized string back to a Message instance with the same content.
This feature can be useful when storing messages in a database and sending them through a queue.
The serialized Message should be without attachments (only a reference to the disk path, or omit completely) and be stored as a simple string including headers.
For example:
Text content does not have to be included, because we can always calculate it from HTML.
Thank you.