Commit Graph
111 Commits
Author SHA1 Message Date
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Marek Safar 7bf00fe94c [System] Fixes a warning 2014-06-27 13:37:50 +02:00
Jeffrey Stedfast 10fa44a5e6 Merge pull request #995 from yjoly/master
Fix the date time set in file by removing the ':'.
2014-06-24 11:07:35 -04:00
Marek Safar 1eac449e69 [system] Add SendMailAsync methods 2014-05-23 21:27:38 +02:00
Miguel de Icaza 705da187cf [System] Fix build warnings 2014-05-04 17:15:18 -04:00
Marek Habersack 34fb07d05f Include support for SSL/TLS right in System when building for the MONODROID profile
This patch builds upon commit 96a8500795 which placed parts of Mono.Security
responsible for dealing with SSL/TLS certificates for the purpose of certificate verification. The code enables
validation of the certifcates even if the user does not provide their own validation callback. The changes as related to
the original commit are few, basically consisting of enabling the same code used by MonoTouch in the MonoDroid context with
the only actual code change being the certificate validation bit mentioned above.

Since the change involves adding a subset of Mono.Security files to the monodroid version of System.dll, it is
also necessary to remove Mono.Android's dependence on Mono.Security.dll. The reason is that the code in AndroidPlatform
which looks up TLS support methods in Mono.Android.dll would use a type (X509CertificateCollection) that is now part of
System.dll but is *also* in Mono.Security.dll referenced by Mono.Android.dll and therefore the lookup would fail since
we'd have two distinct types from the reflection point of view.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=18962
2014-04-25 21:39:53 +02:00
yjoly a4a65eda9a Fix the date time set in file by removing the ':'.
This is the same code than the one under SendCore. The date time should
not have the : (time zone offset) to be able to use the file.
2014-04-15 15:41:40 -04:00
Sebastien Pouliot 96a8500795 Allow the MONOTOUCH targetr to build its SSL/TLS support right inside System.dll and remove code duplication and non-required code paths. 2013-07-01 16:21:04 -04:00
Marek Safar 510f20d376 Fix failing mobile tests 2013-02-26 10:37:01 +01:00
Shay Rojansky bf90b51599 Removed debugging prints that slipped through 2012-11-05 03:42:46 +02:00
Shay Rojansky c1e2462912 Fixed missing Content-Id email headers
When specifying a Content-Id header on Attachments and AlternateViews (but not LinkedResources) the header was not rendered.
This fixes bug #2279.
Also refactored header generation methods.
2012-10-29 02:29:15 +02:00
Miguel de Icaza f48ceb9860 [System] Removal of the NET_2_0 in the source code
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
2012-06-02 13:16:40 -04:00
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