PDA

View Full Version : Sending emails using Qt



homerun4711
9th January 2011, 16:56
Hello!

I have a question about sending emails using Qt. Yes, I already searched the forum on this topic :) I read about vmime, the examples that came with Qt3 and I also found some quite good looking code in this forum: http://forum.qtfr.org/viewtopic.php?id=7736a

But I wonder if there is another, well known and good working solution, a class using only Qt4-methods to send emails with attachments. The code I found in the french forum looks fine, but maybe someone knows about a more common and further developed example.

Kind regards,
HomeR

tbscope
9th January 2011, 17:13
http://www.qtcentre.org/threads/37659-PHP-in-Qt

wysota
9th January 2011, 17:19
I'd probably suggest this one:
http://doc.qt.nokia.com/qtmobility-1.1.0/messaging.html

homerun4711
9th January 2011, 17:50
Thanks for your answers.

qtmobility-1.1.0 looks a bit to mighty for my simple application. libqxt and QwwSmtpClient both look very good, but I guess QwwSmtpClient does not support attachments, is that correct? So I will stick to QxtSmtp, QxtMailMessage and QxtMailAttachment.

wysota
10th January 2011, 10:44
QwwSmtpClient is a low-level API, it accepts a bulk body of the email. You have to format the body yourself. As for mobility, the messaging framework is available in a separate package too: http://qt.gitorious.org/qt-labs/messagingframework

homerun4711
10th January 2011, 17:30
Thanks for the reply. I already wrote code that uses the Qxt classes. They perfectly fit my needs and are very easy to use.