Hello!

I'm trying to send e-mail using Qt Mobility 1.2, but it's not working and i dunno what's happening.

When a call send method from QMessageService, it returns false and the error is 8 (QMessageManager::RequestIncomplete).

The message i'm trying to send is:

QMessageAddress objFrom;
objFrom.setType(QMessageAddress::Email);
QMessageAddress objTo;
objTo.setType(QMessageAddress::Email);
objTo.setAddressee("email@email.com"); //removed to post here
QMessage msg;
msg.setType(QMessage::Email);
msg.setTo(objTo);
msg.setPriority(QMessage::NormalPriority);
msg.setSubject(item->getSubjectEmail());
msg.setBody(mensagem, "text/plain");
msg.setDate(QDateTime::currentDateTime());
QMessageAccountId conta = this->IdContaEmail(contaEmail); //returns the AccountId for a given e-mail. I've tested and it's returning a valid account
msg.setParentAccountId(conta);
if (!_servicoEmail->send(msg))
qDebug() << "Failed to send e-mail" << _servicoEmail->error();


The IdContaEmail method:

QMessageAccountId CEmail::IdContaEmail(const QString &email)
{
QMessageManager man;
QMessageAccountIdList lst = man.queryAccounts();
for (int i = 0; i < lst.count(); i++) {
QMessageAccount conta(lst.at(i));
if (conta.name() == email) {
return lst.at(i);
}
}
return QMessageAccountId();
}

Any help would be appreciated.
Thank you.