How to send email by opening default email application

  • Thread starter Thread starter Dino M. Buljubasic
  • Start date Start date
D

Dino M. Buljubasic

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
 
* "Dino M. Buljubasic said:
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>
 
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
 
* "Cor said:
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>
 
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.
 
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.
 
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.
 
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.
 
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. :)
 
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
 
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:[email protected]?subject=Maildemo&body=Vb
language newsgroup")
End Sub
////
Keep track that there are no spaces in Maildemo&body

Cor
 
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
 
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?
 
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
 
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 (e-mail address removed) then I can be sure that I have
your address. Cheers.

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

Regards both,
Fergus
 
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
 
Back
Top