|
-
Jul 22nd, 2003, 03:07 AM
#1
Thread Starter
Frenzied Member
Launch default Email package
When I click Run on the Start menu and type in "mailto:[email protected]" on my PC it opens a new Email message in Outlook with that address pre-populated.
1. If I did this on some other PC (with a different Email package) would it still launch the Email in the same way?
2. How do I do this from my VB code?
I'm just writing a simple desktop application and it seems to me that this is the simplest and most portable way of launching an Email when the user clicks on the support Email link on the Help/About form.
This world is not my home. I'm just passing through.
-
Jul 22nd, 2003, 03:18 AM
#2
Thread Starter
Frenzied Member
Further to the above, if I use the following
mailto:[email protected]?cc= &bcc= &subject=Howzit &body=
then Outlook fills in the subject field and leaves the cursor in the main body.
Can someone with a different Email package try the same command line and tell me what happens?
Ta.
This world is not my home. I'm just passing through.
-
Jul 22nd, 2003, 03:39 AM
#3
Thread Starter
Frenzied Member
Progress
Ok.
I've got this working on my PC
VB Code:
' Declare and instantiate a new process component.
Dim myproc As System.Diagnostics.Process
myproc = New System.Diagnostics.Process()
' Do not receive an event when the process exits.
myproc.EnableRaisingEvents = False
' Start the default Email package, passing in command line details.
I'd still like somebody with some other Email package (not Outlook) to try it out if they'd be so kind...
This world is not my home. I'm just passing through.
-
Jul 22nd, 2003, 06:58 AM
#4
New Member
Re: Progress
Originally posted by trisuglow
Ok.
I've got this working on my PC
VB Code:
' Declare and instantiate a new process component.
Dim myproc As System.Diagnostics.Process
myproc = New System.Diagnostics.Process()
' Do not receive an event when the process exits.
myproc.EnableRaisingEvents = False
' Start the default Email package, passing in command line details.
I'd still like somebody with some other Email package (not Outlook) to try it out if they'd be so kind...
At work, we run Lotus Notes. When I try to run your code in .NET, it brings up Notes... but does not populate the fields or even begin a new message. Probably just a Notes thing, but I figured I'd mention it to you anyway.
-
Jul 22nd, 2003, 07:23 AM
#5
Thread Starter
Frenzied Member
Hi Tektrader,
If you'd be so kind, would you mind trying this simplified code?
I was hoping that Outlook's command line used some kind of standard (e.g. CGI) that would be compatible with most other mail programs. It looks like maybe Notes didn't like it...
Just try mailto:[email protected] in Start\Run if you don't want to run up .NET again.
Thanks if you have time to do this - I appreciate it.
Tris.
VB Code:
' Declare and instantiate a new process component.
Dim myproc As System.Diagnostics.Process
myproc = New System.Diagnostics.Process()
' Do not receive an event when the process exits.
myproc.EnableRaisingEvents = False
' Start the default Email package, passing in command line details.
This world is not my home. I'm just passing through.
-
Jul 22nd, 2003, 09:21 AM
#6
New Member
Originally posted by trisuglow
Hi Tektrader,
If you'd be so kind, would you mind trying this simplified code?
I was hoping that Outlook's command line used some kind of standard (e.g. CGI) that would be compatible with most other mail programs. It looks like maybe Notes didn't like it...
Just try mailto:[email protected] in Start\Run if you don't want to run up .NET again.
Thanks if you have time to do this - I appreciate it.
Tris.
VB Code:
' Declare and instantiate a new process component.
Dim myproc As System.Diagnostics.Process
myproc = New System.Diagnostics.Process()
' Do not receive an event when the process exits.
myproc.EnableRaisingEvents = False
' Start the default Email package, passing in command line details.
I reran the new code you have, and same thing... it brings Notes to the foreground (or start Notes if it isn't already running), but it won't start a new message. I'm certain it's just because Notes is crap (did I mention that when it locks up and you crowbar it... you HAVE to reboot your machine in order to rerun Notes???). I wrote a program that fixes that (looks for and kills the leftover processes), but it's still a pain in the behind. I'll look for a generic command line for Notes that would allow it to do what you need, and you can just have your code look to see if Notes is the default mail program... then use the command line arguments/switch(es) if it is.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|