Mobility Messaging - Send E-mail with "text/html" MIME type
-
Hello Everyone!!!
I was trying to sell an e-mail with html through Qt Mobility using the Messaging Module, I have done something like this:
@QMessageService* serviceAction = new QMessageService();
QMessage message;
message.setTo(QMessageAddress(QMessageAddress::Email,"tgronerth@gmail.com"));
message.setSubject("QtMobility Messaging");
QString htmlBody("<html><head><title>Prueba</title></head><body><h2 align=center>%1</h2><hr>%2</body></html>");message.setBody(htmlBody.arg("hola!").arg("Cómo estás?????"),"text/html"); // here i have specified the mime type to "text/html"
QMessageManager manager;
foreach (const QMessageAccountId &id;, manager.queryAccounts()) { QMessageAccount account(id); QString nameStr(account.name()); qDebug() << "name: " << nameStr; if(nameStr=="Mail for Exchange") { message.setType(QMessage::Email); message.setParentAccountId(id); } qDebug() << "id:" << id.isValid() << " string:" << id.toString(); }
qDebug() << serviceAction->send(message);
delete serviceAction;@But when the e-mail arrives, it shows the html as a text plain like this:
<html><head><title>Prueba</title></head><body><h2 align=center>hola!</h2><hr>Cómo estás?????</body></html>
I am using Qt Mobility 1.1.3, can anyone tell me what i am doing wrong?
Thanks in advance!
-
[quote author="gronerth" date="1310595503"]Hello Everyone!!!
But when the e-mail arrives, it shows the html as a text plain like this:
[/quote]How do you show the email message?
-
[quote author="Chuck Gao" date="1311951392"]
How do you show the email message?
[/quote]
What do you mean of how do i show?...do you mean how do i see the received message? If it does, i see the received message in the inbox of the gmail, I also have tested with hotmail..