Commit Graph
24 Commits
Author SHA1 Message Date
Marek Safar f0ad346fb6 Mobile tests update 2013-02-22 21:41:19 +01:00
Marek Safar 27677408c5 New test 2011-12-02 15:40:59 +00:00
Gonzalo Paniagua Javier 3198658937 Misc. fixes
-Fix validation of display name and email.
	-Cache user, host and ToString() values.
	-Fix Equals and GetHashCode.

	Fixes bug 645871.
2010-10-13 17:18:09 -04:00
Raja R Harinath cc50d3ac37 Implement envelope sender semantics in SmtpClient
* System.Net.Mail/SmtpClient.cs (SendCore): Compute envelope sender
separately from the 'From: ' header.
* Test/System.Net.Mail/SmtpClientTest.cs (Deliver_Envelope): New.
2010-08-04 09:57:08 +05:30
Raja R Harinath 57f8ebd654 Add a dummy SmtpServer to talk to our SmtpClient in unit tests
* SmtpServer.cs: New.
* SmtpClientTest.cs (Deliver): New.  Use it.
2010-08-04 09:57:08 +05:30
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 04636ba534 Removed executable property.
svn path=/trunk/mcs/; revision=71488
2007-01-22 22:54:48 +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
Miguel de Icaza dfd3b52e94 2007-01-20 Miguel de Icaza <[email protected]>
* MailMessage.cs: Add suport to the MailMessage constructor to
	take a comma-separated list of addresses (Bug #80548). 


svn path=/trunk/mcs/; revision=71401
2007-01-20 23:19:29 +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
John Luke 5b0d1a659f 2006-1-13 John Luke <[email protected]>
* MailMessage.cs: add [MonoTODO] for FormatException in ctor,
        throw ArugmentNullException's from the ctors,
        add internal BodyContentType property,
        change BodyEncoding to use BodyContentType,
        change IsBodyHtml to use BodyContentType,
        * SmtpClient.cs: set timeout initially to 100000,
        don't throw ArgumentOutOfRangeException when Timeout = 0,
        add [MonoTODO] for set_host, and throw Exceptions for it,
        add [MonoTODO] for UseDefaultCredentials,
        get messageContentType from the message,
        use "127.0.0.1" for Host and 25 for Port
        if host or port is not specified until reading
        them from the configuration files is done


svn path=/trunk/mcs/; revision=55549
2006-01-13 20:55:56 +00:00
John Luke e76f69132c add missing classes in System.Net.Mail
update many things to the 2.0 final API
and add some tests

svn path=/trunk/mcs/; revision=54835
2005-12-25 03:37:02 +00:00