Commit Graph
99 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier c649da58f9 [SmtpClient] Don't send empty display name.
If there's no display name, don't send '""'.
	Fixes bug #670475.
2011-02-08 21:01:59 -05:00
Marek Habersack 0f51fe59c2 [system] SmtpClient implements IDisposable on 4.0 (a no-op for now) 2011-01-25 15:46:24 +01:00
Gonzalo Paniagua Javier b353b9cc84 Check that the default from is not empty
This should fix a bunch of tests failing since MailAddress parsing was
	fixed.
2010-10-31 17:29:21 -04: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
Gonzalo Paniagua Javier 97704e7322 Add support for EnableSsl in smtp config.
Ditto.
	Fixes bug #644816.
2010-10-08 00:40:18 -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 b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
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
Miguel de Icaza f47e5fe6a6 2010-03-20 Miguel de Icaza <[email protected]>
* Eliminate warnings in a bunch of places.

svn path=/trunk/mcs/; revision=153952
2010-03-20 23:09:06 +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
Marek Safar 265206db2e Fixes build.
svn path=/trunk/mcs/; revision=148094
2009-12-11 08:43:54 +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
Marek Safar 225f1c9198 Warnings cleanup
svn path=/trunk/mcs/; revision=111790
2008-08-28 09:12:00 +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
Marek Safar bdd9de656e Fixed few warnings
svn path=/trunk/mcs/; revision=107455
2008-07-08 10:34:18 +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
Miguel de Icaza 6162ce03bd 2007-12-27 Miguel de Icaza <[email protected]>
* 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
2007-12-27 18:30:23 +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
Arina Itkes e252cf3f31 Changes for SOAP serialization compatibility with .NET
svn path=/trunk/mcs/; revision=90625
2007-12-04 08:49:11 +00:00
Sebastien Pouliot 0556fed857 remove compilation warning
svn path=/trunk/mcs/; revision=89024
2007-11-06 20:29:21 +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