Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Launching mail client, open new message and add attachments

Launching mail client, open new message and add attachments

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 4 Posters 0 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.
  • D Offline
    D Offline
    Daniel Tak M
    wrote on last edited by
    #1

    The problem is simple: I need to launch the default mail client (mailto: won't help here), open a new message and add some attachments to it. I need to do the same as when the user right-clicks a file and selects "Send to->Mail recipient". I need a solution that works for all mail clients and not just Outlook... and I need it quickly :/

    D M R 3 Replies Last reply
    0
    • D Daniel Tak M

      The problem is simple: I need to launch the default mail client (mailto: won't help here), open a new message and add some attachments to it. I need to do the same as when the user right-clicks a file and selects "Send to->Mail recipient". I need a solution that works for all mail clients and not just Outlook... and I need it quickly :/

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Have you considered MAPI?


      Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

      D 1 Reply Last reply
      0
      • D David Crow

        Have you considered MAPI?


        Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

        D Offline
        D Offline
        Daniel Tak M
        wrote on last edited by
        #3

        I don't know much about MAPI, but from what I've seen it does not support launching the mail client. There seem to be some interfaces which support this, though I can't invest that much time. I also haven't found any examples which use these interfaces, so digging through all the MSDN articles uses way too much time.

        D 1 Reply Last reply
        0
        • D Daniel Tak M

          The problem is simple: I need to launch the default mail client (mailto: won't help here), open a new message and add some attachments to it. I need to do the same as when the user right-clicks a file and selects "Send to->Mail recipient". I need a solution that works for all mail clients and not just Outlook... and I need it quickly :/

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          I wrote a test app for work that uses MAPI and it only took me an hour using the MSDN docs, so it's not like there's no info at all. If the machine has a MAPI-compliant email app (Outlook, Eudora, etc.), you can use MAPISendMail() --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Pinky, are you pondering what I'm pondering? I think so Brain, but how will we fit the hamster inside the accordion?

          1 Reply Last reply
          0
          • D Daniel Tak M

            I don't know much about MAPI, but from what I've seen it does not support launching the mail client. There seem to be some interfaces which support this, though I can't invest that much time. I also haven't found any examples which use these interfaces, so digging through all the MSDN articles uses way too much time.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Tak wrote: I don't know much about MAPI, but from what I've seen it does not support launching the mail client. While it may not "launch" the default mail client in the true sense of the word, it is still the mail API, and, unless you know otherwise, is used by the default mail client. I am only familiar with a few mail clients, and they use MAPI. Outlook uses CDO, which is simply a COM wrapper around MAPI. Tak wrote: ...I can't invest that much time...digging through all the MSDN articles uses way too much time. It is, however, time well spent.


            Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

            D 1 Reply Last reply
            0
            • D David Crow

              Tak wrote: I don't know much about MAPI, but from what I've seen it does not support launching the mail client. While it may not "launch" the default mail client in the true sense of the word, it is still the mail API, and, unless you know otherwise, is used by the default mail client. I am only familiar with a few mail clients, and they use MAPI. Outlook uses CDO, which is simply a COM wrapper around MAPI. Tak wrote: ...I can't invest that much time...digging through all the MSDN articles uses way too much time. It is, however, time well spent.


              Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

              D Offline
              D Offline
              Daniel Tak M
              wrote on last edited by
              #6

              First, even if the time might be well spent, I don't _have_ the time. Second, the mail client has to pop up, I don't want to just send a mail. It's not in my hands, it's the customer who wants it like this ;) Though I looked a bit deeper into the MAPI and saw that you can launch the GUI; I just hope that it works with their strange mail client...

              1 Reply Last reply
              0
              • D Daniel Tak M

                The problem is simple: I need to launch the default mail client (mailto: won't help here), open a new message and add some attachments to it. I need to do the same as when the user right-clicks a file and selects "Send to->Mail recipient". I need a solution that works for all mail clients and not just Outlook... and I need it quickly :/

                R Offline
                R Offline
                Roger Allen
                wrote on last edited by
                #7

                Take alook at the MFC code in void CDocument::OnFileSendMail() for sending the current document as an attachment. It shoudl hopefully show you what you need to do. I did a modification of this that added many attachments. Roger Allen - Sonork 100.10016 If your dead and reading this, then you have no life!

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups