The problem is, you need other things that are denoted with &. Example: mailto: Joe.Hayes@xxxxxxxxxx?subject=look at this website&body=Hi, I found this website and thought you might like it http://www.geocities.com/wowhtml/ I couln't get this to run from cmd.exe for love nor money. Here's some VBScript code that you could invoke to accomplish this. Save it as whatever.vbs, and then it can be executed from the command line, so your java app will have no trouble. set shell = createobject("wscript.shell") theAddr = "someone@xxxxxxxxxxxxx" theCC = "someone-else@xxxxxxxxxxxxx" theBCC = "someone-hidden@xxxxxxxxxxxxx" theSubject = "The subject line" theBody = "Line 1" & vbcrlf & "Line 2" & vbcrlf & "Line 3" shell.run "mailto:" & theAddr _ & "?subject=" & escape(theSubject) _ & "&body=" & escape(theBody) _ & "&cc=" & theCC _ & "&bcc=" & theCC Other options are better. However, they would require actual programming (as opposed to simple scripting). If someone figures out how to get mailto: to go from cmd.exe with all the options, I'd love to see it. -----Original Message----- From: java400-l-bounces+joe.hayes=fiserv.com@xxxxxxxxxxxx [mailto:java400-l-bounces+joe.hayes=fiserv.com@xxxxxxxxxxxx] On Behalf Of Clapham, Paul Sent: Wednesday, October 26, 2005 4:49 PM To: Java Programming on and around the iSeries / AS400 Subject: RE: Questions on "Calling PC Commands from RPG" article The command isn't executed as if it were run in the "Windows Run" box, it's executed as if it were run in the "Command Prompt" window. So you should test-run your commands there instead. And the command you need is start mailto:dan2@xxxxxxxxx And here's a link I dredged up that describes in more detail how to format the mailto URL: http://email.about.com/od/mailtoemaillinks/a/mailto_elements.htm You'll find more such links by googling "mailto URL" (which is where I got that one). Regards PC2 -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan Sent: October 26, 2005 14:33 To: Java Programming on and around the iSeries / AS400; Midrange Systems Technical Discussion Subject: Re: Questions on "Calling PC Commands from RPG" article O.k., thought I'd give an update. Got the PC side working. Ended up setting a classpath as an environment variable. This classpath stuff is as clear as mud. Will have to get more experience using it. Someone off-list sent me an example RPG program that invokes notepad.exe. And this really works like a charm! Unfortunately, I tried using "mailto:dan2@xxxxxxxxx" (using my real address) as a command sent to the data queue, but got: Command to be Executed = mailto:dan2@xxxxxxxxxxxxxxxx did not start :java.io.IOException: CreateProcess: mailto:dan2@xxxxxxxxx error=2 ... even though this works from within the Windows Run dialog box. So... How can I find out how to start an Outlook "Create New Email" window, plugging in recipient email address, subject, and body text? This is Outlook 2002. Presume that Outlook is already running.
This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact