Email and .NET

  • Thread starter Thread starter Charles A. Lackman
  • Start date Start date
C

Charles A. Lackman

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
 
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
 
Hello,

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

Thanks,

Chuck

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
 
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/library/system.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.
 
Hello,

Everything is working great.

Thanks for the Help,

Chuck


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/library/system.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.
 
Back
Top