×

Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    8

    Cannot send e-mail on Symbian (Belle Refresh)

    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.

  2. #2
    Registered User
    Join Date
    Jul 2008
    Posts
    90

    Re: Cannot send e-mail on Symbian (Belle Refresh)

    I think you have msg.setFrom() missing.

  3. #3
    Registered User
    Join Date
    Sep 2012
    Posts
    8

    Re: Cannot send e-mail on Symbian (Belle Refresh)

    I have used this in tests, but gives me the same error...
    Even complete examples don't work. Would be a configuration on my phone or something that i'm missing?

    Thank you

  4. #4
    Registered User
    Join Date
    Sep 2012
    Posts
    8

    Re: Cannot send e-mail on Symbian (Belle Refresh)

    I'm still with no solution. I've tried a lot of ways go do this, but always ends with the same error when send() is called...

  5. #5
    Registered User
    Join Date
    Sep 2012
    Posts
    8

    Re: Cannot send e-mail on Symbian (Belle Refresh)

    I've fixed the issue. It was capabilities.

    Thank you.

Similar Threads

  1. SSL Error / Belle Refresh
    By Benecore in forum [Archived] Qt Quick
    Replies: 2
    Last Post: 2012-09-17, 06:55
  2. Belle refresh with Qt 4.8 rolling out
    By vladestCh in forum Qt
    Replies: 5
    Last Post: 2012-09-04, 08:47
  3. Replies: 2
    Last Post: 2012-01-12, 13:33
  4. how to send mail in j2me without using servlet or any mail api?
    By hitendrasinh.gohil in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2010-11-30, 18:49
  5. Replies: 1
    Last Post: 2005-12-15, 16:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×