Commit Graph
15 Commits
Author SHA1 Message Date
Gert Driesen 13213bdd61 * SmtpClient.cs: Fixed paramname of Argument(Null)Exceptions to match
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
2008-08-16 12:34:38 +00:00
Atsushi Eno 30a99519cf 2007-12-05 Atsushi Enomoto <[email protected]>
* 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
2007-12-05 16:05:27 +00:00
Atsushi Eno 18d58e57ca 2007-11-05 Atsushi Enomoto <[email protected]>
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
2007-11-05 10:33:33 +00:00
Atsushi Eno 9985165563 2007-10-23 Atsushi Enomoto <[email protected]>
* Attachment.cs : reverted previous change. NameEncoding is not
	  guessed at set_Name().

	* AttachmentTest.cs : more NameEncoding tests.


svn path=/trunk/mcs/; revision=87958
2007-10-23 04:28:44 +00:00
Atsushi Eno 7a172ca695 2007-10-22 Atsushi Enomoto <[email protected]>
* AttachmentTest.cs : I have no time to fix it now. Disable it.


svn path=/trunk/mcs/; revision=87928
2007-10-22 18:27:22 +00:00
Atsushi Eno 8c6ec8c74d 2007-10-22 Atsushi Enomoto <[email protected]>
* 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
2007-10-22 06:29:25 +00:00
Atsushi Eno 3487dff120 2007-10-22 Atsushi Enomoto <[email protected]>
* Attachment.cs : null name is allowed.

	* AttachmentTest.cs : test for null names.


svn path=/trunk/mcs/; revision=87887
2007-10-22 06:23:09 +00:00
Atsushi Eno 7b44b5261f 2007-10-22 Atsushi Enomoto <[email protected]>
* LinkedResourceTest.cs : NotWorking, buildbot loudly claims for
	  unimplemented stuff.


svn path=/trunk/mcs/; revision=87885
2007-10-22 03:13:39 +00:00
Atsushi Eno c477d20a6c 2007-10-19 Atsushi Enomoto <[email protected]>
* 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
2007-10-19 07:25:50 +00:00
Atsushi Eno b7461c8e10 2007-10-17 Atsushi Enomoto <[email protected]>
* AlternateView.cs : dispose linked resources. Remove MonoTODOs.
	* Attachment.cs : check null content string.
	  The string argument in .ctor(Stream,string) is name, not mediaType.
	  Use contentEncoding argument in CreateAttachmentFromString().
	* AttachmentBase.cs : TransferEncoding default is QuotedPrintable.

	* LinkedResourceTest.cs, AttachmentTest.cs, AlternateViewTest.cs:
	  added/enabled couple of attachment tests.


svn path=/trunk/mcs/; revision=87674
2007-10-17 14:30:23 +00:00
Atsushi Eno b0b846d5bb 2007-10-16 Atsushi Enomoto <[email protected]>
* 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
2007-10-16 13:00:28 +00:00
Gert Driesen c5400d870a * MailAddress.cs: Throw ArgumentNullException if address is null.
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
2007-06-17 09:46:08 +00:00
Gert Driesen 9d7b03deaf * MailMessageTest.cs: Improved test for To to verify bug #81817 is
fixed.

svn path=/trunk/mcs/; revision=78875
2007-06-07 18:02:55 +00:00
Gert Driesen 90f556e712 * SmtpClient.cs: Added tests for default values.
svn path=/trunk/mcs/; revision=71486
2007-01-22 22:53:56 +00:00
Sebastien Pouliot f61cede226 2006-10-31 Sebastien Pouliot <[email protected]>
* SmtpPermissionAttributeTest.cs: New. Unit tests for 
	SmtpPermissionAttribute.
	* SmtpPermissionTest.cs: New. Unit tests for SmtpPermission.

svn path=/trunk/mcs/; revision=67188
2006-10-31 20:35:01 +00:00