Hi! I tried to send an e-mail with a prepared subject, receiver and body using Qt. The mail shall open in the system default mail client. I am testing on Linux with KMail and Qt 5.5.
This is the code I intended to use:
QDesktopServices::openUrl(QUrl("mailto:?
[email protected]&subject=Test&body=line1%0D%0Aline2", QUrl::TolerantMode));
The mail window opens, subject and receiver are ok. Unfortunately the line
breaks in the body do not work. I also tried <br>, \n, \r\n but none of these
worked. I also tried other ways of constructing a QUrl but it only get worse.
It seems not to be an KMail issue because when writing the following into a
HTML document, opening it in Firefox and clicking the link in the browser, it
does exactly what I want (including line breaks in the body text):
<a href="mailto:[email protected]&subject=test&body=line1%0D%0Aline2">test</a>
Any idea how to solve the line break problem?
--
Best Regards
Bernhard Lindner
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
