Hi,
first of all: I know there is a lot about the topic on "how to open an
email window" in the groups and other forums. But none of the
solutions mentioned there satisfy me.
The following methods have been suggested:
1. using ShellExecute and the mailto handler. It internally looks in
the registry at HKEY_CLASSES_ROOT\mailto\shell\open\command, and just
executes the program given there with the complete parameters which
have an RFC conformant mailto scheme.
2. using commandline specific parameters and default directories to
find and open the mail client.
3. Writing an .eml file and command the mail client to open it.
4. Using MAPI
Problem with 2: very unreliable and ShellExecute and the registry key
do the same but better.
Problem with 3: mail client specific command line and have to find the
client first (can be done using the registry)
Problem with 4: not transparent for the user and the user can not
change the mail content
The best and mostly used approach is 3. But is has some limitations
that annoy me:
- can not attach files (I have seen that MS Outlook has some
undocumented form of attaching files in the mailto scheme, but its
undocumented and unreliable and only works for Outlook)
- the text length is limited. I think this is due to the command line
length limitation that exists.
Has anyone got a better solution or some new idea?
Regards,
Chris