raw dump...
Q286358
post on microsoft.public.dotnet.framework.aspnet:
> ... but when the email arrives, the dot in between domain and com
> (domain.com) in the query string of the url in the body is missing.
The weirdness continues. I've tried to work this down to a repeatable case -
and seem to have found one. The following code is a console app:
using System;
using System.Web.Mail;
namespace SmtpWeird?
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
SendThis?("bad”,
“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=xxxxxxxxxxxxxxxx.xxx
x”);
}
static void SendThis?(String subject, String body) {
MailMessage msg = new MailMessage();
msg.To = “anyone@anydomain.com”;
msg.From = “me@us.com”;
msg.Subject = subject;
msg.Body = body;
SmtpMail?.Send(msg);
}
}
}
You can send it to any email address -- I tried a few different ones to make
sure there wasn't anything funky on a specific server.
When the string arrives in the email, the period is missing:
------->8------------->8---------------
From: webmaster@company.com
Sent: Tuesday, November 12, 2002 9:20 AM
To: devtest@company.com
Subject: bad
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=xxxxxxxxxxxxxxxxxxxx
------->8------------->8---------------
The length of the string seems important (add or subtract a single x up
front and it works fine). The equals sign is also important - replace it
with an ‘x’ and the problem goes away. The problem string is 76 characters
long -- does SmtpMail? do any word-wrapping for plain text? Does it break @
76 characters and that's what causes this? It doesn't matter if there's some
up front text either -- the following has the same problem:
SendThis?("bad”,
“some up front stuff
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=xxxxxxxxxxxxxxxx.xxxx
”);
The position of the period matters as well. Move the period to the right
just one character - and it works okay.
I have not tried this with another SMTP server, just the default one on our
dev IIS box -- dunno if it would matter there.
tags:
ComputersAndTechnology