By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,190 Members | 1,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,190 IT Pros & Developers. It's quick & easy.

How to send email by opening default email application

P: n/a

I'd like my application to be able to detect default email application (MS
Outlook or whichever is set to be default) so that the user can enter the
email body, address, subject line and send the email.

I have found lots of references how to do the same using SmtpMail class but
all of these send an email programatically without opening default emailing
application.

Any help will be greatfully appreciated
Dino
--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com

Nov 20 '05 #1
Share this Question
Share on Google+
21 Replies


P: n/a
* "Dino M. Buljubasic" <di*************@rivusglobal.com> scripsit:
I'd like my application to be able to detect default email application (MS
Outlook or whichever is set to be default) so that the user can enter the
email body, address, subject line and send the email.

I have found lots of references how to do the same using SmtpMail class but
all of these send an email programatically without opening default emailing
application.


You may want to convert this code to VB.NET (page is written in German):

<http://www.vb-tec.de/shellexe.htm>

Instead of 'ShellExecute' you can use
'System.Diagnostics.Process.Start'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #2

P: n/a
* hi***************@gmx.at (Herfried K. Wagner [MVP]) scripsit:
[...]

You will find a nice implementation for .NET written by Fergus here:

<http://www.google.de/groups?hl=de&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=5af79bba29b0b965&seekm=OdN0woCmDH A.2964%40tk2msftngp13.phx.gbl#link4>

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3

P: n/a
Cor
Herfried,

Very good, I did want to do this, because he did sent it again this
afternoon for Scorpion for which I did make an example also using the
webbrowser (from that first piece of program I got from you).

But then I saw your own reply

:-))

You make me very happy doing it in this way.

Cor
Nov 20 '05 #4

P: n/a
* "Cor" <no*@non.com> scripsit:
Very good, I did want to do this, because he did sent it again this
afternoon for Scorpion for which I did make an example also using the
webbrowser (from that first piece of program I got from you).

But then I saw your own reply

I don't have a problem in talking to/about Fergus/his posts and
solutions. I respect him for his knowledge!
You make me very happy doing it in this way.


;-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #5

P: n/a
Fergus doesn't have a problem in talking to/about your posts either. I'm
certain he respects your knowledge...

What you continue to fail to understand is that you are annoying people.
You are not in charge. (time to write PLONK again) since somebody disagrees
with you.

Just don't reply to the guy for gosh sake. Give your hormones a rest.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn*************@ID-208219.news.uni-berlin.de...
* "Cor" <no*@non.com> scripsit:
Very good, I did want to do this, because he did sent it again this
afternoon for Scorpion for which I did make an example also using the
webbrowser (from that first piece of program I got from you).

But then I saw your own reply

I don't have a problem in talking to/about Fergus/his posts and
solutions. I respect him for his knowledge!
You make me very happy doing it in this way.


;-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>

Nov 20 '05 #6

P: n/a
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
Fergus doesn't have a problem in talking to/about your posts either.


Maybe you didn't read his posts.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #7

P: n/a
Hi Dino,

Lol. You asked that question only just over a week ago!!

I gave a routine for doing the job but you said

|| No, I'd like to open up the mail program and enter the
|| subject line and the message by myself into it. The
|| address To and From would be fetched from a database.

I'm wondering how that routine falls short of your needs. The only bit I'm
not sure about is setting the From field. Otherwise it's simply:

StartDefaultMail (sWhoItsTo)

Regards,
Fergus

ps. I'm looking forward to the Calendar but my modem's too slow.
Nov 20 '05 #8

P: n/a
And maybe you didn't.

I know what he means and other people know what he means. He has a problem
with your attitude.

Maybe you didn't read your own posts.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn*************@ID-208219.news.uni-berlin.de...
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
Fergus doesn't have a problem in talking to/about your posts either.


Maybe you didn't read his posts.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>

Nov 20 '05 #9

P: n/a
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
I know what he means and other people know what he means. He has a problem
with your attitude.


I know that. But that's _his_ problem.

Let's stop the discussion at this point in order to prevent other people
from downloading lots of OT posts.

:-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #10

P: n/a
No Herfried,

Let's stop the discussion when I'm ready. Right after my reply... then when
you feel like replying it will look like you couldn't just leave things
alone, okay?

It isn't his problem, it is _your_ problem. That's the problem. You don't
see that you have any part of this. Funny isn't it, Fergus isn't calling me
names? And if he did and I yelled back and eventually he wrote "can't we
just ignore each other" I would say "good idea" and ignore him. He would
ignore me and generally speaking everything would be okay again.

See if you ignored him instead of insisting you are right we wouldn't be
having this conversation. Your replies annoyed me enough that I couldn't
just sit back without responding. I should have, it was dumb of me but I
did it anyway.

Okay NOW... let's stop the discussion at this point in order to prevent
other people from downloading lots of OT posts.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn*************@ID-208219.news.uni-berlin.de...
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
I know what he means and other people know what he means. He has a problem with your attitude.


I know that. But that's _his_ problem.

Let's stop the discussion at this point in order to prevent other people
from downloading lots of OT posts.

:-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>

Nov 20 '05 #11

P: n/a
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
Let's stop the discussion when I'm ready. Right after my reply... then when
you feel like replying it will look like you couldn't just leave things
alone, okay?


Sorry for replying, I would have liked to write you a mail but your
mail address didn't work.

:-(((

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #12

P: n/a
Hi Fergus, :)

yes I know I asked it about a week ago. I stopped working on that
functionality after having some problems then tried to add it today again.
Just realized that I have to add the Web reference first. :) (Yeaaah, I
know, I am a beginer :) )

I did not have time to test it toroughly thoug since I am doing something
else but it looks like if I just ignore the fielsd for To, From, Subject and
Body, It will open the application that is set to be dafault if I add
"emailto:" parameter. So, it seams to be working well, but as I sad, I am
working on other things so will be able to really test it some time this
week or so.

PS. Did you get calendar? I sent it to you last night from home? Let me
know and if not, I'll send it again (Actaully, I'll send it again anyways
tonight. I fixed the problem with icons on the toolbar, after researching I
found out that the tool bar can only lay on the form and my was inside a
panel. I guess that was the problem)

Thanks for your reply. :)

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Fergus Cooney" <fi*****@post.com> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
Hi Dino,

Lol. You asked that question only just over a week ago!!

I gave a routine for doing the job but you said

|| No, I'd like to open up the mail program and enter the
|| subject line and the message by myself into it. The
|| address To and From would be fetched from a database.

I'm wondering how that routine falls short of your needs. The only bit I'm not sure about is setting the From field. Otherwise it's simply:

StartDefaultMail (sWhoItsTo)

Regards,
Fergus

ps. I'm looking forward to the Calendar but my modem's too slow.

Nov 20 '05 #13

P: n/a
Hi Dino,

I sent you an email about the Calendar so I guess that'll come through
sometime. Maybe it was your home address. The Calendar is so big!! I've
explained ways to cut it down. That's why I look forward to it. It was there -
but just beyond reach!

Lader Dude ;-))

Regards,
Fergus
Nov 20 '05 #14

P: n/a
Cor
Hi Dino,

When you use the webbrower in your program I think this is the easiest and
nicest way.

\\\\
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.AxWebBrowser1.Navigate2("mailto:no*@non.com?sub ject=Maildemo&body=Vb
language newsgroup")
End Sub
////
Keep track that there are no spaces in Maildemo&body

Cor
Nov 20 '05 #15

P: n/a
Hey Fergus,

I can not find the article about "Merging Versions". Where is that post?
I'd like to read it.

PS. Did you get the calendar?

Regards,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Fergus Cooney" <fi*****@post.com> wrote in message
news:et*************@TK2MSFTNGP11.phx.gbl...
Hi Dino,

I sent you an email about the Calendar so I guess that'll come through
sometime. Maybe it was your home address. The Calendar is so big!! I've
explained ways to cut it down. That's why I look forward to it. It was there - but just beyond reach!

Lader Dude ;-))

Regards,
Fergus

Nov 20 '05 #16

P: n/a
Hi Cor,

I am using so far process.start("emailto:") (just one parameter) an it works
fine at the office, although at home I get "Access Denied" error.

Anyways, will play with that some time later. Thanks for your help.

Regards,
Dino

PS. Did you get calendar?

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Dino,

When you use the webbrower in your program I think this is the easiest and
nicest way.

\\\\
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.AxWebBrowser1.Navigate2("mailto:no*@non.com?sub ject=Maildemo&body=Vb
language newsgroup")
End Sub
////
Keep track that there are no spaces in Maildemo&body

Cor

Nov 20 '05 #17

P: n/a
Hi Dino,

LOL. When you're at work and my emails go to home and vice versa. Plus the
time-zones. ;-)

It's under Topic: Adding my own properties to a control. It's doesn't say
that much and I've run the new Calendar and seen that you have the 7-pixel
problem code in place and the speed-up code too, so you have already merged
the two.

Having only just received the Calendar myself, I haven't sent it to Cor
yet.

Regards,
Fergus
Nov 20 '05 #18

P: n/a
Hi Dino,

"emailto:" may be fine at work but the standard protocol is "mailto:"

Hi Cor,

I have a largish (but nothing like 1.5MB, ;-)) Lol), Calendar from Dino
which I'd like to send you. I could use the mailbox on the Ligthert site but I
don't know <for sure> that it's you there. I'm very reluctant to send someone
a 400MB attachment out of the blue. 8-O

If you send me an email at fi****@post.com then I can be sure that I have
your address. Cheers.

(ps No worries on the .vbs thing ;-))

Regards both,
Fergus
Nov 20 '05 #19

P: n/a
haha, yes time zones make things tough.

Please note that my home address will get inactive in couple of hours, I'll
get new one some time next week. :)

Regards,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Fergus Cooney" <fi****@post.com> wrote in message
news:Od****************@TK2MSFTNGP10.phx.gbl...
Hi Dino,

LOL. When you're at work and my emails go to home and vice versa. Plus the time-zones. ;-)

It's under Topic: Adding my own properties to a control. It's doesn't say that much and I've run the new Calendar and seen that you have the 7-pixel
problem code in place and the speed-up code too, so you have already merged the two.

Having only just received the Calendar myself, I haven't sent it to Cor yet.

Regards,
Fergus

Nov 20 '05 #20

P: n/a
Hey Fergus,

I have resent the calendar (only ~400kb) :)

Did you get that one?

Regards, Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Fergus Cooney" <fi****@post.com> wrote in message
news:eR****************@TK2MSFTNGP10.phx.gbl...
Hi Dino,

"emailto:" may be fine at work but the standard protocol is "mailto:"

Hi Cor,

I have a largish (but nothing like 1.5MB, ;-)) Lol), Calendar from Dino which I'd like to send you. I could use the mailbox on the Ligthert site but I don't know <for sure> that it's you there. I'm very reluctant to send someone a 400MB attachment out of the blue. 8-O

If you send me an email at fi****@post.com then I can be sure that I have your address. Cheers.

(ps No worries on the .vbs thing ;-))

Regards both,
Fergus

Nov 20 '05 #21

P: n/a
Hi Dino,

It's like I said to Cor just above.

Regards,
Fergus
Nov 20 '05 #22

This discussion thread is closed

Replies have been disabled for this discussion.