Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-2015

QMessaging doesn't support HTML mail sending in Symbian Belle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 1.2.1
    • Messaging
    • None
    • Symbian Belle and Anna.

      With QMessage::SetBody function one can set email body and MIME type. If MIME is set to text/html, and email is sent content type gets converted to text/plain. And this will cause email clients to show HTML tags in plain text.

      Short code snippet how email is sent:


      QMessageAddressList toList;
      foreach (QString contact, contacts) {
      toList.append(QMessageAddress(QMessageAddress::Email, contact));
      }

      QMessage message;
      message.setDate(QDateTime::currentDateTime());
      message.setFrom(QMessageAddress(QMessageAddress::Email, from));
      message.setTo(toList);
      message.setType(QMessage::Email);
      message.setSubject(subject);

      message.setBody("<HTML><BODY><h1>TITLE</h1><P>Body text...</P></BODY></HTML>","text/html");
      message.setParentAccountId(messageAccount.id());

      bool sent = messageService.send(message);

      Full example attached.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            satu.m.makela satu makela
            juhanak Juhana Koski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes