> On 7 Nov 2023, at 09:28, Jeffrey Walton <noloa...@gmail.com> wrote:
> 
> Hi Everyone,
> 
> I've been lurking a while to collect information for an upcoming
> project. I have not seen a similar topic, so I'm going to ask...
> 
> I have a collection of email messages in mbox format. I obtain them
> from GMail, and Export Data operation. I can parse them into
> individual messages. For each message, I need to virtually display
> them in a Html-like view, and then print them to a pdf.
> 
> Lurking and Google search is not turning up useful results. I saw KDE
> has some gear, like KMBox::MBox, but I want to stay in Qt.
> 
> My question is, does Qt offer any support for mbox format?

Not that I know of, but I’m sure you can find some C++ code somewhere.

>  Or rich
> email messages?
> Or do I need to extract the html parts of the message, and then supply
> a string to QTextBrowser?

QTextBrowser’s HTML support is not very modern or complete.  If you are not 
satisfied with the rendering, maybe it’s better to use Qt Webengine.  On the 
other hand, in that case let’s hope you trust the senders.  It’s becoming 
rather insecure to let a browser download every remote image etc. that is 
referenced in every HTML email; so in my mail clients I usually have that 
feature turned off by default, so that there’s a button to optionally download 
inline images only occasionally.

This sounds like something to try in Python rather than C++: it sounds like a 
“scripty” thing to do rather than a long-lived application, you can use Qt, and 
you can probably find code for mbox pretty easily too.

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to