email / textbox limitation

G

Guest

The simple e-mail webform in the shown in the code below sends the characters in its textbox as an email message correctly when text of any length is pasted into the textbox but not when large numbers of characters are typed into the textbox. The limit to the number of characters that you can type into the textbox and still have them ALL sent as email is somewhere around 1000. After the number of characters typed into the textbox exceeds something like 1000, the resulting e-mail message is truncated.

What can be done to make this app work when large numbers of characters are entered from the keyboard?

private void Button1_Click(object sender, System.EventArgs e)
{
MailMessage mess = new MailMessage();
mess.From = "(e-mail address removed)";
mess.To = "(e-mail address removed)";
mess.Subject = "test";
mess.BodyFormat = MailFormat.Text;
mess.Body = TextBox1.Text;
SmtpMail.SmtpServer = "mail.xxx.com";
SmtpMail.Send(mess);
}
 
P

Phill. W

.. . .
The limit to the number of characters that you can type into the
textbox and still have them ALL sent as email is somewhere around
1000.
.. . .
What can be done to make this app work when large numbers of
characters are entered from the keyboard?

[New to PostBacks and stuff, but...]
Does your HTML Form specify "method=Get"? If so, that may
well be your problem. The actual limit differs with versions of IIS,
but a 1000-odd character limit on QueryStrings, which "method=Get"
would be subject to, is quite typical.

HTH,
Phill W.
 
G

Guest

The results are the same for both method="Get" and method="Post"


Phill. W said:
.. . .
The limit to the number of characters that you can type into the
textbox and still have them ALL sent as email is somewhere around
1000.
.. . .
What can be done to make this app work when large numbers of
characters are entered from the keyboard?

[New to PostBacks and stuff, but...]
Does your HTML Form specify "method=Get"? If so, that may
well be your problem. The actual limit differs with versions of IIS,
but a 1000-odd character limit on QueryStrings, which "method=Get"
would be subject to, is quite typical.

HTH,
Phill W.
 

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