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

Email and .NET

P: n/a
Hello,

I am trying to format an email and have a .net application open up Outlook
or Outlook Express so that the user can simply click Send and have the
formatted email send from their email account. I am currently doing this
the following way:

Dim sParams As String
Dim TheTo, TheSubject, TheBody As String
TheTo = txtEmail.Text
TheSubject = ""
TheBody = ""
sParams = "mailto:" & TheTo
sParams = sParams & "?subject=" & TheSubject
sParams = sParams & "&body=" & TheBody
System.Diagnostics.Process.Start(sParams)

The problem this is that it creates a new instance of Outlook every time the
event is fired to create the email. All I want is for a new email to appear
and add the data that I want. After about 6 or 7 emails are created this
way, Outlook freezes up and stops working.

Any suggestions will be greatly appreciated,
This is vb .net.

Chuck
Apr 6 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Chuck,
I am trying to format an email and have a .net application open up
Outlook or Outlook Express so that the user can simply click Send and
have the formatted email send from their email account. I am
currently doing this the following way:


If you have the possibility, try to send the email directly out of your
application (instead of using any other Email Client)... Just thing
about, if someone uses Outlook Express or Mozilla Thundbird or any other
Mail Client, then your solutions won't work or is at least partly
dependent on the third party client.

Check out System.Web.Mail (on .NET 1.1) or System.Net.Mail (on .NET 2.0).

hth
Markus
Apr 6 '06 #2

P: n/a
Hello,

The application is being made to work with only Outlook or Outlook Express.

Thanks,

Chuck

"Markus" <di***************@THISyahoo.de> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Chuck,
I am trying to format an email and have a .net application open up
Outlook or Outlook Express so that the user can simply click Send and
have the formatted email send from their email account. I am
currently doing this the following way:


If you have the possibility, try to send the email directly out of your
application (instead of using any other Email Client)... Just thing
about, if someone uses Outlook Express or Mozilla Thundbird or any other
Mail Client, then your solutions won't work or is at least partly
dependent on the third party client.

Check out System.Web.Mail (on .NET 1.1) or System.Net.Mail (on .NET 2.0).

hth
Markus
Apr 6 '06 #3

P: n/a
Outlook is an SMTP client, when it comes to sending emails. As Markus told
you, it is not necessary to use Outlook to send an email. Your application
can send it all by itself, using the System.Net.Mail namespace and the
SmtpClient class. See:

http://msdn2.microsoft.com/en-us/lib....net.mail.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
"Charles A. Lackman" <Ch*****@CreateItSoftware.net> wrote in message
news:eO**************@TK2MSFTNGP03.phx.gbl...
Hello,

The application is being made to work with only Outlook or Outlook
Express.

Thanks,

Chuck

"Markus" <di***************@THISyahoo.de> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Chuck,
I am trying to format an email and have a .net application open up
Outlook or Outlook Express so that the user can simply click Send and
have the formatted email send from their email account. I am
currently doing this the following way:


If you have the possibility, try to send the email directly out of your
application (instead of using any other Email Client)... Just thing
about, if someone uses Outlook Express or Mozilla Thundbird or any other
Mail Client, then your solutions won't work or is at least partly
dependent on the third party client.

Check out System.Web.Mail (on .NET 1.1) or System.Net.Mail (on .NET 2.0).

hth
Markus

Apr 6 '06 #4

P: n/a
Hello,

Everything is working great.

Thanks for the Help,

Chuck
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uN**************@TK2MSFTNGP05.phx.gbl...
Outlook is an SMTP client, when it comes to sending emails. As Markus told
you, it is not necessary to use Outlook to send an email. Your application
can send it all by itself, using the System.Net.Mail namespace and the
SmtpClient class. See:

http://msdn2.microsoft.com/en-us/lib....net.mail.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
"Charles A. Lackman" <Ch*****@CreateItSoftware.net> wrote in message
news:eO**************@TK2MSFTNGP03.phx.gbl...
Hello,

The application is being made to work with only Outlook or Outlook
Express.

Thanks,

Chuck

"Markus" <di***************@THISyahoo.de> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Chuck,
I am trying to format an email and have a .net application open up
Outlook or Outlook Express so that the user can simply click Send and
have the formatted email send from their email account. I am
currently doing this the following way:


If you have the possibility, try to send the email directly out of your
application (instead of using any other Email Client)... Just thing
about, if someone uses Outlook Express or Mozilla Thundbird or any other
Mail Client, then your solutions won't work or is at least partly
dependent on the third party client.

Check out System.Web.Mail (on .NET 1.1) or System.Net.Mail (on .NET 2.0).

hth
Markus


Apr 7 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.