web reference to system.web.dll

C

cj

I'm writing a VB .net 2003 windows application and want to send email
from it. I've tried

System.Diagnostics.Process.Start("mailto:?Subject=" & TextBox1.Text.Trim
& "&Body=" & TextBox3.Text.Trim)

but it doesn't take a very large body.

I found an example
http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage that is
credited to Fergus Cooney, Cor Ligthert and Herfried Wagner and I'm
trying to test it. I can't figure out how to add the web reference to
system.web.dll that they say needs to be added. I go to add web
reference by can't figure out how to pull it up.

Any help would be appreciated.
 
C

Cor Ligthert [MVP]

cj,

Click the tab Project in top.
Clikk than the tab add references
Click than at System.Web in the Net box
Click the Add

And write in top of your program
Imports System.Web

Something as this is possible your problem

Cor
 
C

cj

Yea, I tried to cancel the question. I was trying to add a web
reference and I just needed to add a reference.

I haven't tested the routine yet, but it is recognizing
system.web.httputility now.
 
J

Jim Hughes

That is essentially a QueryString.

Querystring is generally going to be limited to < 1024 total characters.
 
C

cj

Seems I do need help. Just FYI the procedure I'm using is at the bottom
of the article at
http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage
I cut and pasted it into my program and for testing call the procedure
with the command: StartDefaultMail(TextBox1.Text.Trim,
TextBox2.Text.Trim, TextBox3.Text.Trim)

I tested with textbox3.text = "This is only a test" and it worked except
in the email body it looked like "This+is+only+a+test". What's up with
that?

But I really need to send a long message. once I get a couple thousand
characters in textbox3 it throws and exception and will not start
outlook. Is there a way to handle long messages?
 
C

cj

So there's no way around the 1024 char body?

Jim said:
That is essentially a QueryString.

Querystring is generally going to be limited to < 1024 total characters.
 
C

cj

Ok, finally found something and it seems to vary with email client but
there is a max to the length of the string you use to start the email
program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top