Sponsored by
www.aspnetemail.com
|
 |
Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
-
Use MailEncoding.UUEncode
[ Reply ]
There is a second argument in the MailAttachment constructor that allows you to set the type of encoding. By using...
MailAttachment a = new MailAttachment(<filename>, MailEncoding.UUEncode);
... I was able to overcome this problem.
Rajnesh Singh [ spam ( at ) rajnesh dot com ],
2004-04-28 14:56:09
#
-
RE: Use MailEncoding.UUEncode
[ Reply ]
This worked like a charm, thanks!
Stan [ s_shillis ( at ) hotmail dot com ],
2005-07-21 06:20:35
#
-
RE: Use MailEncoding.UUEncode
[ Reply ]
How bizarre. This fix worked for me as well. I didn't actually expect it to, since the New MailAttachment(filename) method is supposed to use UUEncode by default. It actually SAYS that's what it does in the VS.NET pop-up.
Ah well, thanks for the fix!
Al B [ al-web ( at ) jeepaholics dot com ],
2005-08-24 11:56:42
#
-
RE: Use MailEncoding.UUEncode
[ Reply ]
This totally worked for me to! You rock! THANK YOU THANK YOU THANK YOU! I spent so much fricken time messing with this.
Sean [ systemwebmail ( at ) nowisit dot net ],
2006-03-08 13:51:16
#
-
RE: Use MailEncoding.UUEncode
[ Reply ]
Really it worked.I was struggling due to this problem. Thanka a ton.
Adil [ kazmi dot adil ( at ) gmail dot com ],
2007-05-23 07:54:31
#
-
RE: Use MailEncoding.UUEncode
[ Reply ]
Thanks a lot for ur suggestion.it is working but When I am sending the Attachment to any of the Gmail account then it is going in plain text format instead of PDF attacment.why it is happening. for other mail accounts pdf attachment is sending in appropriate order.. Can you guys suggest something for that??? What is the solution for that??
Adil [ adil ( at ) vsoftconsulting dot com ],
2007-05-23 09:16:03
#
-
PDF attached in W XP
[ Reply ]
I have a program (Visual Studio .NET 2003) that sends an e-mail whith a PDF attached. In Windows 2000 it runs ok but, the same program, the same PDF, everything equal in a computer with Windows XP, is corrupting my PDF (A bit smaller size). If I attach a text file, it runs ok in both systems. Do you have any explanation, or better, any solution?
jaime [ jaimeprob ( at ) hotmail dot com ],
2004-06-14 04:20:57
#
-
mail.body
[ Reply ]
I was having the same trouble with an excel document. Simply add some text to the mail.body and it no longer is corrupting the file.
Richard [ Rich ( at ) nowhere dot com ],
2004-09-22 13:26:34
#
-
RE: mail.body
[ Reply ]
Thank you, thank you, thank you for the adding text to the body suggestion. It worked for the PDF files I am sending and has saved me from a great deal of potential pain.
Thanks again!
Rob Zison [ rob dot zison ( at ) activeye dot com ],
2005-08-22 19:51:26
#
-
RE: mail.body
[ Reply ]
Million times thank you ...... Added some text in Body and Booom started working fine... No corrupted files any more. You saved my day
Nayan [ nayan_eng81 ( at ) hotmail dot com ],
2006-02-26 19:25:07
#
-
Semi Solution
[ Reply ]
We recently ran into the same problem as well. The only problem with ours was that it seemed to arbitrarily do the dot stuffing. We couldn't figure out how the beginning of the line thing worked.
So, in the ongoing effort to resolve the problem (sending HTML reports as attachments), we tried several things. One thing that worked for our situation was to replace all periods (.) with . ([Ampersand][PoundSign][Four][Six][Semicolon]). This was originally passed over because it would replace every period including the dot in systemwebmail.com for instance. We didn't think it would still pull up our images, but it did.
I don't know how you could fix the PDF problem, but there has to be a solution besides purchasing a license over $100 USD for a t-tiny bug that I am sure will be fixed in .NET 2.0.
Also, when I was submitting this post, I did notice the disclaimer:
* In order to reduce SPAM, all email addresses will be obfuscated so they cannot be read by spam bots. For example: 'test@test.com' will become 'test (at) test dot com'.
Take a look at http://www.codeproject.com/aspnet/NoSpamEmailCustomize.asp. That is one awesome way to get around the problem of spam bots.
Jason Landry [ jason dot personal ( at ) icabob dot com ],
2004-09-23 11:04:39
#
-
thies worked for us
[ Reply ]
the KB article at http://support.microsoft.com/?id=286358 allowed us to get around this issue without adding any additional code.
Mark [ mark ( at ) hotmail dot com ],
2004-12-09 17:27:20
#
-
Microsoft's "fix"
[ Reply ]
http://support.microsoft.com/kb/286358
Who knows why they added a flag for DisableDotStuff instead of just fixing CDONTS to properly dot stuff the body.
Anonymous [ anonymous ( at ) mailinator dot com ],
2005-01-05 14:19:22
#
-
RE: Microsoft's "fix"
[ Reply ]
They probably put a new flag instead of just fixing the bug so that programs using the previous version (and that have perhaps fixed the bug themselves) aren't broken by an upgrade. Microsoft has (or at least had? c.f. http://www.joelonsoftware.com/articles/APIWar.html) a tradition of respecting backwards compatibility.
Debatable, probably, but certainly defendable.
Eric [ anon ( at ) ymous dot com ],
2005-07-29 05:00:26
#
-
Solution: empty email attachments
[ Reply ]
I was having a problem with .PDF and .Tiff files being attached in an asp.net email. These files were empty and only 64B in size. Any administrator logon would work, but not any other user. I wanted to post this because I saw many other users with the same issue.
The solution was to grant permission to the temp folder in the following directory. C:\Documents and Settings\computername\ASPNET\Local Settings
Brian [ bewilliams ( at ) hoshizaki dot com ],
2005-04-11 12:44:42
#
-
similar problem
[ Reply ]
I seem to have the problem that any attachment over 100k is being stripped out and sent as a 64B placeholder. I've tried both encoding types, and it seems independent of whether I use IIS SMTP or an Exchange server. This is happening regardless of file type. (textfiles, zipfiles, excel files, whatever)
Peter [ pkenway ( at ) winxnet dot com ],
2005-10-17 08:38:43
#
-
Use FreeSMTP.Net
[ Reply ]
I solved that problem by migrating to FreeSMTP.Net http://www.quiksoftcorp.com/freesmtp/ . It has no the dots-removal-bug and some other bugs of System.Web.Mail. FreeSMTP.Net is a free library (if you don't redistribute it for profit). It works great for me. I migrated to it within about 30 minutes.
Alex [ alexxys ( at ) mail dot ru ],
2006-12-25 01:56:09
#
-
RE: Use MailEncoding.UUEncode
[ Reply ]
I am sending the Attachment to any of the Gmail account then it is going in plain text format instead of PDF attacment.I am using UUencoding??why it is happening? for other mail accounts like yahoo etc. pdf attachment is comming in appropriate order.. Can you guys suggest something for that??? What is the solution for that??
you can reply at adil@vsoftconsulting.com
adil [ adil ( at ) vsoftconsulting dot com ],
2007-05-24 04:20:34
#
-
Is it on a particular OS??
[ Reply ]
I am facing same issue while sending PDFs via System.Web.Mail.
It's working fine on my local machine (xp) but failing on server (windows 2003). Is it machine dependent? Is there any patch from microsoft for this?
What about this: http://weblogs.asp.net/steveschofield/archive/2007/01/23/system-web-mail-and-pdf-getting-corrupted-workaround.aspx
Here's the error I m getting while opening PDF: "There was an error reading this document. There was an error opening this document."
Geek [ geekfromindia ( at ) gmail dot com ],
2008-01-23 07:48:41
#
|