Commit Graph
75 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier 7a5370dcc4 2010-06-28 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: support PLAIN authentication and throw if LOGIN and
	PLAIN are not supported. Fixes bug #607249.


svn path=/trunk/mcs/; revision=159619
2010-06-28 21:00:00 +00:00
Miguel de Icaza a90edd6979 2010-05-04 Miguel de Icaza <[email protected]>
* Apply patch from Ted Unangst to fix bug 574049

svn path=/trunk/mcs/; revision=156700
2010-05-05 03:10:07 +00:00
Gonzalo Paniagua Javier 80db348b3c 2010-03-06 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: typo in reply-to header. Thanks to Chris Tomlinson.
	Fixes bug #578271.


svn path=/trunk/mcs/; revision=153183
2010-03-06 16:40:23 +00:00
Gonzalo Paniagua Javier b411d31cf3 2010-02-15 Gonzalo Paniagua Javier <[email protected]>
* 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
2010-02-16 01:22:22 +00:00
Gonzalo Paniagua Javier 91a420aa6b 2010-01-21 Gonzalo Paniagua Javier <[email protected]>
* 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
2010-01-21 15:21:27 +00:00
Miguel de Icaza 2be93c0df1 2009-12-11 Miguel de Icaza <[email protected]>
* SmtpClient.cs: Add half-implemented feature, TargetName for the
	SPN SMTP system.

svn path=/trunk/mcs/; revision=148093
2009-12-11 06:22:59 +00:00
Miguel de Icaza dd0bc8418a 2009-12-11 Miguel de Icaza <[email protected]>
* SmtpClient.cs, MailMessage.cs: Add 4.0 APIs.

svn path=/trunk/mcs/; revision=148092
2009-12-11 06:03:45 +00:00
Sebastien Pouliot c259a8cc51 2009-08-20 Sebastien Pouliot <[email protected]>
* SmtpClient.cs: Honor ServicePointManager.
	ServerCertificateValidationCallback when provided


svn path=/trunk/mcs/; revision=140347
2009-08-20 16:01:57 +00:00
Gonzalo Paniagua Javier adcc59f1eb 2009-08-03 Gonzalo Paniagua Javier <[email protected]>
* Attachment.cs: set the body encoding for multipart attachments.
	Fixes bug #527177.


svn path=/trunk/mcs/; revision=139278
2009-08-03 12:48:11 +00:00
Gonzalo Paniagua Javier f3af4e6e1d 2009-06-08 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: handle dots. Patch by Ted Unangst that fixes bug
	#392875.


svn path=/trunk/mcs/; revision=135692
2009-06-08 20:40:18 +00:00
Gonzalo Paniagua Javier e36b6625b9 2008-11-17 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: remove unused variable and obsolete comment.


svn path=/trunk/mcs/; revision=119084
2008-11-17 19:47:45 +00:00
Miguel de Icaza 0770265c72 2008-09-17 Miguel de Icaza <[email protected]>
* SmtpClient.cs: Actually set some of the headers like Priority,
	ReplyTo and Sender.

svn path=/trunk/mcs/; revision=113370
2008-09-18 00:33:11 +00:00
Atsushi Eno 6f83b3926e 2008-09-05 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : attachment stream consumption was insufficient.
	  Fix bug #347553, by David Ion.


svn path=/trunk/mcs/; revision=112349
2008-09-05 02:23:27 +00:00
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 6b4f2a9616 2008-08-15 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : fixed bug #382670, based on the patch by Ted
	  Unangst. DeriveryMethod.SpecifiedPickupDirectory was not supported.


svn path=/trunk/mcs/; revision=110555
2008-08-15 05:56:20 +00:00
Atsushi Eno f20381f211 2008-08-14 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : Patch by Ted Unangst, fixed bug #392843.
          Encode emails correctly as well as join multiple emails
          correctly.

        * ContentType.cs : patch by Ted Unangst, fixed bug #392843.
          handle RFC2047 encoding.


svn path=/trunk/mcs/; revision=110488
2008-08-14 15:31:41 +00:00
Atsushi Eno d896e8ed89 2008-08-12 Atsushi Enomoto <[email protected]>
* 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
2008-08-12 16:39:56 +00:00
Atsushi Eno 962c99959b 2008-08-07 Atsushi Enomoto <[email protected]>
* 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
2008-08-07 14:06:36 +00:00
Andreas N 2ddc6e0862 2008-04-21 Andreas Nahr <[email protected]>
* SmtpClient.cs: Fix bug with string handling

svn path=/trunk/mcs/; revision=101274
2008-04-21 07:41:34 +00:00
Andreas N b72f941a54 2008-04-21 Andreas Nahr <[email protected]>
* SmtpClient.cs: Fix formatting

svn path=/trunk/mcs/; revision=101273
2008-04-21 07:37:26 +00:00
Gonzalo Paniagua Javier 27a5bbb3c0 2008-04-20 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: made ParseExtension() work. After STARTTLS, reset
	data retrieved from EHLO.
	Fixes bug #377463.



svn path=/trunk/mcs/; revision=101253
2008-04-20 17:36:51 +00:00
Juraj Skripsky 6084514833 2008-04-03 Juraj Skripsky <[email protected]>
* Attachment.cs (InitName): Use Path.GetFileName instead of Substring hack.
	Fixes bug #366947.


svn path=/trunk/mcs/; revision=99754
2008-04-03 15:27:00 +00:00
Juraj Skripsky 7fa2329ad2 2008-01-29 Juraj Skripsky <[email protected]>
* SmtpClient.cs (ToQuotedPrintable): Escape the escape character "=".

svn path=/trunk/mcs/; revision=94383
2008-01-30 15:01:30 +00:00
Juraj Skripsky a8174005c8 2008-01-29 Juraj Skripsky <[email protected]>
* 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
2008-01-29 08:32:42 +00:00
Atsushi Eno fb964f7862 2007-12-06 Atsushi Enomoto <[email protected]>
* 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
2007-12-06 14:22:51 +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 1cb3e370e6 2007-12-05 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : fold base64 string at 76 characters.
	  Should fix bug #344974.


svn path=/trunk/mcs/; revision=90741
2007-12-05 09:53:13 +00:00
Atsushi Eno 2dec17b103 2007-12-05 Atsushi Enomoto <[email protected]>
* 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
2007-12-05 09:49:37 +00:00
Arina Itkes 7c81b3ab52 Changes in ChangeLog moved to their place
svn path=/trunk/mcs/; revision=90650
2007-12-04 11:01:39 +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
Arina Itkes 0d98ba3fcf Fix of SmtpClient.Read() method:
Added check of string position before calling 
	Substring and IndexOf methods of string.

svn path=/trunk/mcs/; revision=88539
2007-10-31 08:21:13 +00:00
Atsushi Eno c4e3f8b022 2007-10-23 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : small async refactory.


svn path=/trunk/mcs/; revision=87969
2007-10-23 10:04:12 +00:00
Atsushi Eno b51ae171e7 2007-10-23 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : Implemented async operations.


svn path=/trunk/mcs/; revision=87962
2007-10-23 09:28:44 +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 86239d33c6 2007-10-22 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : lunatic cyclic build.


svn path=/trunk/mcs/; revision=87917
2007-10-22 17:03:30 +00:00
Atsushi Eno 2f82986c49 2007-10-22 Atsushi Enomoto <[email protected]>
* AttachmentBase.cs : implemented Dispose(bool).


svn path=/trunk/mcs/; revision=87908
2007-10-22 14:02:43 +00:00
Atsushi Eno 2b86e687c7 2007-10-22 Atsushi Enomoto <[email protected]>
* 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
2007-10-22 13:54:23 +00:00
Atsushi Eno 40817b3cbb 2007-10-22 Atsushi Enomoto <[email protected]>
* 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
2007-10-22 06:31:56 +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 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 c8c644a223 2007-10-17 Atsushi Enomoto <[email protected]>
* MailMessage.cs : removed MonoTODO. some comment.
	* SmtpException.cs, SmtpFailedRecipientsException.cs,
	  SmtpFailedRecipientException.cs : implemented serialization.


svn path=/trunk/mcs/; revision=87642
2007-10-17 09:28:54 +00:00
Atsushi Eno 3f926b473e 2007-10-16 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : use 3 StringBuilder.Replace() calls rather than
	  3 string.Replace() calls.


svn path=/trunk/mcs/; revision=87592
2007-10-16 14:45:54 +00:00
Atsushi Eno 5a515eea6b 2007-10-16 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : do state check on other setters than set_Timeout().


svn path=/trunk/mcs/; revision=87591
2007-10-16 14:43:21 +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
Atsushi Eno 0b25f00f49 2007-10-16 Atsushi Enomoto <[email protected]>
* 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
2007-10-16 07:06:34 +00:00
Atsushi Eno a4add0a1d9 2007-10-16 Atsushi Enomoto <[email protected]>
* AlternateViewCollection.cs, LinkedResourceCollection.cs,
	  AttachmentCollection.cs : added missing 2.0 members.


svn path=/trunk/mcs/; revision=87557
2007-10-16 06:59:36 +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
Jeffrey Stedfast cf6457b1cc 2007-05-31 Jeffrey Stedfast <[email protected]>
* 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
2007-06-01 01:46:13 +00:00