|
Re: Launching the system mail reader [message #453935 is a reply to message #453925] |
Thu, 14 April 2005 09:28 |
Eclipse User |
|
|
|
Originally posted by: martin.j.nilsson.sverige.nu
This is perhaps not the best solution, but I placed an e-mail (as a a
msg-file) in the current directory of my application and then executed
the default mail-program and added the e-mail as a parameter. Like this:
final Program program = Program.findProgram (".msg");
if (program != null) {
program.execute("path to pre-formatted e-mail");
}
In windows you can probably do something like:
Runtime.getRuntime().exec("rundll32.exe url.dll,FileProtocolHandler
mailto:<adress>?subject=<subject>&body=<body>");
which seems nicer to me, but is of course limited to Window.
regards,
martin
|
|
|
Re: Launching the system mail reader [message #453936 is a reply to message #453935] |
Thu, 14 April 2005 09:30 |
Eclipse User |
|
|
|
Originally posted by: martin.j.nilsson.sverige.nu
An added note:
I'm sure you would be able to put the .msg-file inside of your jar-archive
and get it using a .getResourceAsStream() if you wanted to hide it from
the user.
regards,
martin
|
|
|
|
|
|
Re: Launching the system mail reader [message #454083 is a reply to message #453969] |
Fri, 15 April 2005 19:57 |
Benjamin Pasero Messages: 337 Registered: July 2009 |
Senior Member |
|
|
Well, when I want to work with the system default Mail Client, I am just
opening a
"mailto:abc@xyz.com" using the System default Browser. This might not be
the best
solution, but afaik it is working in most cases.
It is also possible to pass Subject, CC, BC and Mail Body into the Mail, see
http://en.selfhtml.org/html/verweise/email.htm
Ben
> Daniel Spiewak wrote:
>
>> Also, on Fedora Core 3 - and I assume other Gnome platforms - the
>> Program class> doesn't seem to be able to pull anything up at all.
>> In other words, using Program is a Windows and Mac only solution anyway.
>
>
> Didn't know that, thank you for enlightning me. I'm right in assuming
> that this is a bug and that the Program Class should be able to work
> with all OSes? Found these
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=79268
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=78910
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=79681
>
> which seems to relate to the same problem. Hopefully this will be
> fixed in the somewhat near future then.
>
> What is the best way to find the user's email-client then? Any ideas?
>
>
> kind regards,
> martin
>
|
|
|
Powered by
FUDForum. Page generated in 0.03461 seconds