We are building an internal utility that will allow our sales guys to click on a toolbar button which will then create a new email message dialog (from outlook) and attach an invoice as well as a reference line including some body to the email.
Our first point of call was the UICorrespondanceManager but the problem is that the WriteEmail() method does not take any parameters really so a further trawl through the SDK found the UIEmailManager.
We did find the CreateEmailDraft() method within this assembly but it is unsupported so best practices state it should not be used. It did everything we needed (as long as our email client was Outlook 20007) i.e., it allowed us to define the msg body, subject line, create a history and add attachments!
Is there any chance or plans to have the UICorrespondance to expose the functionality that does exist within the SDK?
Would it be at all possible to have an explanation of the reason why some of these functional methods/properties are not exposed?
I was unfortunately the one that had to give you the bad news about the particular Overload that was being used for the CreateEmailDraft() was not supported.
The problem was not in the CreateEmailDraft but in the particular overload that was being used.
CreateEmailDraft() overloads 1 - 3 are fine to use and are supported within the SDK. The trouble arose in the use of 4 - 7 which requires the Act.UI.Email.dll for the System.Collections.Specialized.StringCollection attachments object (not supported).
As for why those particular assemblies are not exposed/supported I would imagine arise from the perspective of backwards compatability. With Email this assembly is probably an area that needs to be updated for fixes and features.
The Disclaimer says it best i think:
Other ACT! assemblies exist, but are not supported or maintained for compatibility. Future versions of ACT! may include non‐compatible versions of these assemblies. Developers should not depend on any DLL’s or EXE’s that ACT! installs other than the supported assemblies listed above. Unsupported DLL’s and EXE’s may change or be removed.
Hopefully, someone else here has already run into this particular problem with Email attachements and might be able to provide some sort of workaround for you. Ideas?
All that said, I will submit a feature request for you in order to hopefully get this functionality exposed in future releases.
I feel a little embarased now with you recognising the query! Haha! Thanks for the reply. I understand why there has to be set list of supported assembelies and as you said it does make sense for future compatability etc.
It would be great if the functionality could be exposed in the UICorrespondanceManager class since it would avoid having to use VSTO to do the same ...which I find a complete nightmare personally!