Launching mail client, open new message and add attachments
-
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 :/
-
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 :/
Have you considered MAPI?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
Have you considered MAPI?
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
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.
-
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 :/
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? -
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.
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?
-
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?
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...
-
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 :/
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!