Mail Method Modifying Attachments?

J

Jerry Houston

I wrote a simple utility for submitting source files to our build folks for
patching a pending release. It uses methods from the System.Web.Mail
namespace to create an email message, attach a list of source files (by path
name), and send it to a list of recipients.

While I was away on vacation, someone complained that this utility stripped
some '.' characters (dots) out of some source files, specifically changing
"this." to "this" in several places. Of course, those sources wouldn't
build.

My utility doesn't even open the sources, let alone do a search/replace of
any kind. It simply uses the library method to add files -- based on their
local path names -- to a message that's being prepared. Thus, I can't see
that there's any way it could be corrupting those files, and suspect that
it's a problem elsewhere in the system.

But I don't know what all the System.Web.Mail methods do with attachment
files, of course, so there's the very unlikely possibility that some of the
library methods I'm using are at fault. Has anyone else using this
namespace ever found (or even suspected) that any of its methods could
possibly be responsible for removing characters from an attached file? Has
anyone else used that namespace to email source files as attachments, and
NOT had any dots stripped out of object names?

I think we need to look elsewhere for the cause of the problem, but I don't
want to give anyone the impression that I'm reluctant to admit that there
might actually be a flaw in my own utility.
 
W

WRH

Hello

I don't know specifically what the System.Web.Mail methods do but in
general all email attachment files must be read and encoded (eg base64)
before
sending.. the email client on the other end then decodes them.

Possible error sources...

The mail server (eg pop3 server) may decode and re-encode before the client
gets the
mail (checking for virus etc)

Some email clients interpret ..<cr><lf> as end of message...perhaps the
Web mail methods are being "helpful" by avoiding this...

Hope this helps
 

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