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
* 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
* ContentType.cs : for SubjectEncoding, null is returned instead of
ASCII (.net compat way). For this cosmetic change, BodyEncoding is
changed to fill ASCII automatically.
* MailMessage.cs : fixing cosmetic .net compatibility. Automatically
fill ASCII when guessed encoding is nothing.
* MailMessageTest.cs : fixed test to just compare codepage. I can't
stand with this trivial difference (w/ BOM or not) as regression,
and fixing this "regression" causes practical bug (garbage BOM
insertion).
svn path=/trunk/mcs/; revision=90771
* Attachment.cs : use correct TransferEncoding when (Text)Encoding
is specified.
* MailMessage.cs : ContentTransferEncoding implementation went into
ContentType.
* ContentType.cs : added GuessTransferEncoding() to guess correct
encoding type for sys.net.mail.Attachment.
Here UTF8Encoding should not include BOM.
svn path=/trunk/mcs/; revision=90740
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
* LinkedResource.cs : Now they are implemented and soon to be
supported. Fixed TransferEncoding (same as other AttachmentBase).
* LinkedResourceTest.cs : removed NotWorking.
svn path=/trunk/mcs/; revision=87888
* 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
Allow display name to be specified as part of the address. Fixes
bug #81854. Return zero-length string in DisplayName if no display
name is set.
* MailAddressTest.cs: Added tests for ctors and specifying display
name as part of address.
svn path=/trunk/mcs/; revision=79916
* 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
* MailMessage.cs: Add suport to the MailMessage constructor to
take a comma-separated list of addresses (Bug #80548).
svn path=/trunk/mcs/; revision=71401
* AttachmentBase.cs - proper MIME type handling added
* MailAddress.cs - Proper mail address handling ('<' and '>' addition) added
* MailMessage.cs - Better construction sequence
* SmtpClient.cs - Added proper handling of composite message (consisting of alternate views/attachments)
- Added handling of user credentials
- Added handling of TLS (under TARGET_JVM)
- Some other minor fixes
svn path=/trunk/mcs/; revision=69277
* SmtpClient.cs: Added MonoTODO for missing SSL/TLS support and
updated existing MonoTODO (or changed them to FIXME) to be clearer
for anyone using the API.
svn path=/trunk/mcs/; revision=68827