all groups > iis smtp nntp > august 2007 >
You're in the

iis smtp nntp

group:

Missing Character When Sending Emails


Missing Character When Sending Emails Guy
8/20/2007 3:07:43 PM
iis smtp nntp: Our ASP.NET application sends an email using IIS SMTP service with several
URL hyperlinks inside. The weird thing is one of the URL would always drop a
"." between file name and the extension. For example, ASP.NET would only
show ASPNET in the URL when we receive the email. We checked the email in
the pickup folder and it looks fine before we enable the smtp service to
send it. However, the "." always disappears when we receive the same email.
Is this a bug? I call Microsoft several times and they have not even faxed
me the documents they mentioned in the recorded message.

We do have MSDN subscription which comes with the support. I do not know how
to use it any more since they change the way to support developers recently.
Re: Missing Character When Sending Emails Sanford Whiteman
8/20/2007 8:56:19 PM
[quoted text, click to view]

How are you crafting the e-mails that you place in \Pickup? Are you
assembling them using an SMTP/MIME component, or writing them out to
disk completely from scratch (which is prone to embedding illegal
whitespace)?

When you say, "...one of the URL would always drop...": is this URL
the first one, the last one, or seemingly a clickable URL anywhere in
the message?

Can you please send me, as an attachment, a sample .EML exactly as it
looks after you write it into \Pickup and before you start the
service?

Re: Missing Character When Sending Emails Steve Schofield
8/24/2007 5:58:33 PM
What I suggest to people is turn off the SMTP service and review the
formatting of the email your code generated. From what you are describing,
this is code related vs. a bug. Here is a blog I did on turning off the
SMTP service. A person also added to the comments how to perform this in
ASP.NET 2.0.

Hope this helps.

http://tinyurl.com/2t59zn

--

Best regards,

Steve Schofield
Windows Server MVP - IIS
http://weblogs.asp.net/steveschofield


[quoted text, click to view]
Re: Missing Character When Sending Emails Sanford Whiteman
8/26/2007 12:57:31 AM
[quoted text, click to view]

Took a look at the generated messages off-list and determined the
problem. It's also noted in

http://support.microsoft.com/?id=3D286358

There is insufficient documentation of cdoSendUsingPickup internals
vs. cdoSendUsingPort that clearly invites insufficient code. The two
send options are *not* differentiated solely by the method of mail
submission (dropping into local \Pickup using file I/O alone vs. SMTP
client/server submission).

A more important difference is that Port makes CDOSYS act like an
RFC-compliant SMTP client, which includes automatically making changes
to the message body before submission to prepare it for later SMTP
RFC-required modifications. OTOH, Pickup makes no effort to prepare
the message body for SMTP transmission, assuming (I would say wrongly
in the overwhelming # of cases) that there is some kind of SMTP
pre-processor or SMTP-savvy coder "wrapping" CDOSYS and making such
message body modifications *before* CDOSYS is called. Then IIS acts
ignorant of the use of Pickup (though CDOSYS and IIS would seem
tightly coupled, given that cdoSendUsingPickup is the default when IIS
SMTP is installed!)... makes changes to submitted messages as if
they've been pre-processed... and mangles results.

The Metabase change noted in the KB article changes behavior so that
the IIS side "understands" that CDOSYS is incorrectly (though
understandably, given barebones docs) used as if it were
through-and-through an SMTP client library and *doesn't* make related
changes.

I see little justification for the default behavior, but at least
there is a fix.

Reference RFC 822 4.5.2, Transparency.

Re: Missing Character When Sending Emails Steve Schofield
8/28/2007 12:21:40 AM
I'm not sure I follow completely besides the first step in troubleshooting I
would take is looking at the message formatting to ensure it's ok. 99% of
the time, I use SMTP method of delivery vs. dropping directly into the
pickup folder. The only product I've use to drop directly into the pickup
folder is AspNetEmail, which is a .NET based component.

Good info on the support.microsoft.com site though, one of these days I'll
see if I can reproduce this issue. It looks like an obscure one that can be
easily overlooked if someone is using CDOSYS.

--

Best regards,

Steve Schofield
Windows Server MVP - IIS
http://weblogs.asp.net/steveschofield


[quoted text, click to view]

Took a look at the generated messages off-list and determined the
problem. It's also noted in

http://support.microsoft.com/?id=286358

There is insufficient documentation of cdoSendUsingPickup internals
vs. cdoSendUsingPort that clearly invites insufficient code. The two
send options are *not* differentiated solely by the method of mail
submission (dropping into local \Pickup using file I/O alone vs. SMTP
client/server submission).

A more important difference is that Port makes CDOSYS act like an
RFC-compliant SMTP client, which includes automatically making changes
to the message body before submission to prepare it for later SMTP
RFC-required modifications. OTOH, Pickup makes no effort to prepare
the message body for SMTP transmission, assuming (I would say wrongly
in the overwhelming # of cases) that there is some kind of SMTP
pre-processor or SMTP-savvy coder "wrapping" CDOSYS and making such
message body modifications *before* CDOSYS is called. Then IIS acts
ignorant of the use of Pickup (though CDOSYS and IIS would seem
tightly coupled, given that cdoSendUsingPickup is the default when IIS
SMTP is installed!)... makes changes to submitted messages as if
they've been pre-processed... and mangles results.

The Metabase change noted in the KB article changes behavior so that
the IIS side "understands" that CDOSYS is incorrectly (though
understandably, given barebones docs) used as if it were
through-and-through an SMTP client library and *doesn't* make related
changes.

I see little justification for the default behavior, but at least
there is a fix.

Reference RFC 822 4.5.2, Transparency.

--Sandy
Re: Missing Character When Sending Emails Sanford Whiteman
8/28/2007 1:17:58 AM
[quoted text, click to view]

The message formatting is perfectly valid for submission to an
RFC-compliant SMTP client library.

But CDOSYS _does not_ operate as an RFC-compliant SMTP client library
when in Pickup mode. It does not add the transport-level failsafe
modifications that an SMTP library (and a SMTP client app such as
Outlook or Thunderbird) adds.

The receiving IIS SMTPSVC, however, erroneously assumes that the
modifications have been made. This is true regardless of whether the
destination of the e-mail is remote or local (it's the local delivery
case that makes this without a doubt an IIS bug). IIS makes
counter-modifications per RFC 822; since the initial modifications
were not made, but the counter-modifications were, the message is
broken.

[quoted text, click to view]

Hmm... anything that drops messages into the pickup folder without
complying with the SMTP client (sender-SMTP) RFCs will break messages,
unless the metabase tweak is in place. I would hope that a 3rd-party
component that offers an "IIS Pickup Folder" option by name would be
aware of the default IIS behavior, but maybe not....

Re: Missing Character When Sending Emails Steve Schofield
9/4/2007 9:47:09 PM
www.aspnetemail.com is the component I'm referring to. I've never used the
pickup folder method with CDOSys. I've turned off the service and viewed
messages both in Notepad and could open in another text editor to see if
'odd' characters are being added.

That is good information to know about the RFC, that is a little over my
head. :)
--

Best regards,

Steve Schofield
Windows Server MVP - IIS
http://weblogs.asp.net/steveschofield


[quoted text, click to view]
Re: Missing Character When Sending Emails Sanford Whiteman
9/4/2007 11:43:17 PM
[quoted text, click to view]

If I get a chance, I'll see if it copes with the bug or not.

AddThis Social Bookmark Button