Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED]Invoke External e-mail and set HTML content
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Invoke External e-mail and set HTML content

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 5 Posters 6.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vetryaspa
    wrote on last edited by
    #3

    Yes but I not have found a method to invok the e-mail process, whit this method i have to costruct all form.

    I wont invok app i don't wont creat all form

    is possible?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #4

      As Gerolf said you should use Qt Mobility. Key classes for your case are "QMessage":http://doc.qt.nokia.com/qtmobility/qmessage.html and "QMessageService":http://doc.qt.nokia.com/qtmobility/qmessageservice.html. Method "compose":http://doc.qt.nokia.com/qtmobility/qmessageservice.html#compose will open the default composer application using message as a prototype. Example:

      @
      QMessageService* pMessageManager = new QMessageService(this);
      QMessage message;
      message.setType(QMessage::Email);
      message.setBody("your message");
      pMessageManager->compose(message);
      @

      Btw using the same approach you can open the default app for SMS or MMS (of course it works on both Symbian and MeeGo devices).

      http://anavi.org/

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vetryaspa
        wrote on last edited by
        #5

        I have found this method and run... wath do you think?

        @DesktopServices::openUrl(QUrl("mailto:user@foo.com?subject=Test&body=Just a test"))@

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leon.anavi
          wrote on last edited by
          #6

          [quote author="Vetryaspa" date="1331303594"]I have found this method and run... wath do you think?

          @DesktopServices::openUrl(QUrl("mailto:user@foo.com?subject=Test&body=Just a test"))@[/quote]

          In my opinion even if this works it would be much better to use the standard solution with Qt Mobility QMessage and QMessageService which I recommended in my previous post.

          http://anavi.org/

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vetryaspa
            wrote on last edited by
            #7

            ok!! if i would sand messag in HTML format how i can do it? because the bady was not formatted in HTML even if i insert some HTML code

            1 Reply Last reply
            0
            • L Offline
              L Offline
              leon.anavi
              wrote on last edited by
              #8

              [quote author="Vetryaspa" date="1331304023"]ok!! if i would sand messag in HTML format how i can do it? because the bady was not formatted in HTML even if i insert some HTML code[/quote]

              The official documentation includes an "example how to compose e-mail with HTML content":http://doc.qt.nokia.com/qtmobility/serviceactions.html.

              http://anavi.org/

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Vetryaspa
                wrote on last edited by
                #9

                [quote author="leon.anavi" date="1331304383"]
                [quote author="Vetryaspa" date="1331304023"]ok!! if i would sand messag in HTML format how i can do it? because the bady was not formatted in HTML even if i insert some HTML code[/quote]

                The official documentation includes an "example how to compose e-mail with HTML content":http://doc.qt.nokia.com/qtmobility/serviceactions.html.
                [/quote]

                this code not run, where is the probelm?

                @ QString testo;

                      testo.append("<HTML CONTENT TEXT>");
                
                
                      QMessageService* pMessageManager = new QMessageService(this);
                      QMessage message;
                      message.setType(QMessage::Email);
                      message.setSubject(rist->value("NOME_RISTORANTE"));
                      QString htmlBody("<html><head></head><body>%1</body></html>");
                      message.setBody(htmlBody.arg(testo),"text/html");
                
                      pMessageManager->compose(message);@
                

                Why not run?

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Vetryaspa
                  wrote on last edited by
                  #10

                  no body can help me?

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    adrz1
                    wrote on last edited by
                    #11

                    Official documentation says:

                    On Symbian platform email messages with HTML body cannot be sent. If HTML content needs to be sent it can be added as attachment.

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      Vetryaspa
                      wrote on last edited by
                      #12

                      [quote author="adrz1" date="1335790370"]Official documentation says:

                      On Symbian platform email messages with HTML body cannot be sent. If HTML content needs to be sent it can be added as attachment.[/quote]

                      Ok... Tnx for Answer

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        luca
                        wrote on last edited by
                        #13

                        @
                        QDesktopServices::openUrl(QUrl("mailto:user@foo.com?subject=Test&body=Just a test"))
                        @
                        Some times ago I used this to open my default mail client and I think it's not so bad...

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved