* SmtpClient.cs: generate correct MIME when there are text and html
linked resources. Fixes bug #579984. Patch by Ásgeir Halldórsson.
svn path=/trunk/mcs/; revision=151758
* SmtpClient.cs: rethrow inner exception so that
AsyncCompletedEventArgs.Error gets the right value on error. Patch
by Dimitar Dobrev.
svn path=/trunk/mcs/; revision=149983
MS. Removed upper limit check for Port. Modified Send to no longer
allow a whitespace-only Host. Moved checks for SpecifiedPickupDirectory
delivery method to SendFile, and use Path.IsPathRooted to check for
absolute paths instead of using a unix-only check. In Send, wrap all
non-SMTP errors in an SmtpException.
* SmtpException.cs: Correctly chain up all .ctors. Removed extra
null check in deserialization .ctor.
* SmtpClientTest.cs: Added property tests. Added Send argument check
tests.
* SmtpExceptionTest.cs: Added .ctor and GetObjectData tests.
* System_test.dll.sources: Added SmtpExceptionTest.cs.
svn path=/trunk/mcs/; revision=110647
* SmtpClient.cs : fixed bug #382670, based on the patch by Ted
Unangst. DeriveryMethod.SpecifiedPickupDirectory was not supported.
svn path=/trunk/mcs/; revision=110555
* SmtpClient.cs : fixed bug #392682, in the same spirit in the
patch by Ted Unangst, to assure safety on socket closing.
svn path=/trunk/mcs/; revision=110263
* SmtpClient.cs : Fixed bug #392809, patch by Ted Unangst. Text body
was not copied to byte array which is being sent.
svn path=/trunk/mcs/; revision=109861
* SmtpClient.cs: Remove ':' from the time zone offset in the
mail's date field. Fixes bug #351443.
(ToQuotedPrintable): Make sure text encoded as quoted-printable does
not contain more then 76 chars per line (required by rfc1521). Fixes
bug #351448.
svn path=/trunk/mcs/; revision=94232
* WebClient.cs: We catch exceptions that happen on the helper
async threads toa void terminating the application on errors, and
also raise a variant of the OnXXXXCompleted methods that take an
Exception argument.
Note that this differs from the .NET implementation in that
we actually raise a signal on error, and set the exception, and in
their case no error is ever raised.
We now call CompleteAsync in the OnXXXCompleted handlers to ensure
that the WebClient can be reused immediately by the callback.
This fixes#350621.
This also should fix the bug report on IRC where someone
complained that they could not "chain" invocations to XXXAsync
methods from the OnXXXXCompleted handlers due to the WebClient
refusing to work if there was an ongoing operation
svn path=/trunk/mcs/; revision=91959
* AlternateView.cs : supply charset info for ContentType.
* SmtpClient.cs : for ToQuotedPrintable() input, don't use utf8
StreamReader to get input string. Just use Encoding.GetBytes().
Fixed bug #346162.
svn path=/trunk/mcs/; revision=90809
fixed bug #339037.
* AlternateView.cs : CreateAlternateViewFromString() allows null
Encoding.
* SmtpClient.cs : looks like when Body is null and AlternativeViews
contains only 1 item, then the alternate view becomes as if it
were just a body. To make this possible, added couple of more
transfer-encoding conversion methods.
For more AlternateViews cases, Body is treated
as empty. With attachments it is even complicated: those alternate
views are just in one boundary, so do not send empty string.
Removed debug output (Console.WriteLine).
What a mess.
* AlternateViewTest.cs : added test for CreateAlternateViewFromString
with null Encoding arg.
svn path=/trunk/mcs/; revision=88850
* AttachmentCollection.cs : remove TODO.
* Attachment.cs : guess NameEncoding when set_Name().
* MailMessage.cs : moved encoding guess impl to ContentType.
* SmtpClient.cs : moved RFC 2047 encoding impl to ContentType.
Support attachment Name encoding. Added some SSL changes (it's not
working yet).
svn path=/trunk/mcs/; revision=87907
* SmtpClient.cs : attachment refactory. First, determine whether we
send multipart/mixed for attachments. Second, determine whether we
send multipart/alternative for AlternateViews.
Consider LinkedResources. Mark EnableSsl as TODO.
svn path=/trunk/mcs/; revision=87889
* AlternateView.cs, AttachmentView.cs, AttachmentBase.cs :
reverted default back to TransferEncoding.Base64 again, and use
QuotedPrintable only when created from string.
No need to check null Stream at AlternateView.ctor(). See base.
* SmtpClient.cs : For multipart message, do not send body twice (it
still emits extraneous part, which should be fixed too).
Do not premise charset existence in every AttachmentBase.
* AlternateViewTest.cs : default TransferEncoding value is more
complicated.
svn path=/trunk/mcs/; revision=87814
* MailMessage.cs : Some entire refactory on BodyEncoding and
IsBodyHtml. BodyEncoding and SubjectEncoding are guessed when
Body and Subject are set for each.
* SmtpClient.cs :
Subject header is encoded according to RFC 2047.
Body is encoded according to RFC 2821.
Output Date header.
ToQuotedPrintable() should take encoding into consideration.
For SevenBit/Unknown TransferEncoding, just decode with ASCII.
In set_UseDefaultCredentials(), raise NIE only when value is true.
In set_Timeout(), raise an error when Send() is in progress.
* MailMessageTest.cs : added test for encoding guess.
svn path=/trunk/mcs/; revision=87585
* SmtpClient.cs : Replace every \r and \n with \r\n per RFC 2821
section 2.3.7, or you will receive SMTP error 451.
svn path=/trunk/mcs/; revision=87558
* SmtpClient.cs: Added an extensions parser to figure out if the
ESMTP server supports things like STARTTLS and which AUTH
mechanisms are supported. Don't try authenticating if no authmechs
are supported.
svn path=/trunk/mcs/; revision=78391
* SmtpClient.cs: Fall back to HELO if EHLO fails. Also, do not
write out a Bcc header to the SMTP server - these are meant to be
dropped. MAIL FROM: and RCPT TO: commands are not meant to have a
space after the colon before the address - this will break on some
SMTP servers.
svn path=/trunk/mcs/; revision=78273