Commit Graph
38 Commits
Author SHA1 Message Date
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 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
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 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 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 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 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
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
Jeffrey Stedfast 313f1020cc 2007-05-30 Jeffrey Stedfast <[email protected]>
* SmtpClient.cs: Fall back to HELO if EHLO fails. Also, do not
	write out a Bcc header to the SMTP server - these are meant to be
	dropped. MAIL FROM: and RCPT TO: commands are not meant to have a
	space after the colon before the address - this will break on some
	SMTP servers.


svn path=/trunk/mcs/; revision=78273
2007-05-30 21:35:20 +00:00
Geoff Norton 5113a5fad0 2007-02-16 Geoff Norton <[email protected]>
* SmtpClient.cs: Dont send bare LF.  Send <CR><LF> regardless
        of platform.  (ref: http://cr.yp.to/docs/smtplf.html)


svn path=/trunk/mcs/; revision=73039
2007-02-16 18:46:02 +00:00
David Elkind 8c0a70d016 useDefaultCredentials is initialized to false
svn path=/trunk/mcs/; revision=71241
2007-01-18 10:15:09 +00:00
Miguel de Icaza f23ed056e8 Remove redundant or incorrect todos, set propstyle
svn path=/trunk/mcs/; revision=70002
2006-12-23 19:05:41 +00:00
David Elkind 38cf5f48da ChangeToSSLSocket made simpler
svn path=/trunk/mcs/; revision=69607
2006-12-17 17:19:57 +00:00
David Elkind 8da8ce4fa1 MailAddress compliance problem fixed
svn path=/trunk/mcs/; revision=69440
2006-12-13 09:32:55 +00:00
Atsushi Eno 113d852e54 2006-12-12 Atsushi Enomoto <[email protected]>
* SmtpClient.cs : use CONFIGURATION_DEP when it is
	  System.Configuration.dll dependent.


svn path=/trunk/mcs/; revision=69298
2006-12-11 07:27:19 +00:00
David Elkind 949c846b90 Removed WriteLine
svn path=/trunk/mcs/; revision=69281
2006-12-10 15:47:19 +00:00
David Elkind a99e078be1 * Attachment.cs - proper file name handling added
* AttachmentBase.cs - proper MIME type handling added
	* MailAddress.cs - Proper mail address handling ('<' and '>' addition) added
	* MailMessage.cs - Better construction sequence
	* SmtpClient.cs - Added proper handling of composite message (consisting of alternate views/attachments)
			- Added handling of user credentials 
			- Added handling of TLS (under TARGET_JVM)
			- Some other minor fixes

svn path=/trunk/mcs/; revision=69277
2006-12-10 15:29:58 +00:00
Sebastien Pouliot bd7213bbf0 2006-12-01 Sebastien Pouliot <[email protected]>
* SmtpClient.cs: Added MonoTODO for missing SSL/TLS support and 
	updated existing MonoTODO (or changed them to FIXME) to be clearer
	for anyone using the API.


svn path=/trunk/mcs/; revision=68827
2006-12-01 13:28:46 +00:00
Andrew Skiba fe9f5d4504 TARGET_JVM
svn path=/trunk/mcs/; revision=66025
2006-09-28 13:25:14 +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
John Luke b6441ad3f9 2005-12-22 John Luke <[email protected]>
minor updates I noticed for 2.0 final API
        * DispositionTypeNames.cs: change to a static class
        * MediaTypeNames.cs: change these to static classes
        * TransferEncoding.cs: remove Binary and EightBit


svn path=/trunk/mcs/; revision=54767
2005-12-23 02:29:34 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Tim Coleman 32fb1735a7 2004-09-10 Tim Coleman <[email protected]>
* SmtpClient.cs SmtpFailedRecipientsException.cs:
                Add failed recipient exception handling.

svn path=/trunk/mcs/; revision=33727
2004-09-10 19:51:36 +00:00
Tim Coleman 1dd5edf8db 2004-09-09 Tim Coleman <[email protected]>
* AttachmentCollection.cs MailAddressCollection.cs:
                New classes
        * Attachment.cs: Set content string
        * MailMessage.cs: Use new collection classes
        * SmtpClient.cs: Lots of MIME cleanup

svn path=/trunk/mcs/; revision=33690
2004-09-10 04:27:21 +00:00
Tim Coleman fa3d3892ea 2004-09-08 Tim Coleman <[email protected]>
* Attachment.cs: Add SetContentFromFile methods
        * MailMessage.cs: Add MIME-Version header
        * SmtpClient.cs: Add some attachment handling.

svn path=/trunk/mcs/; revision=33603
2004-09-08 23:26:44 +00:00
Tim Coleman 8a963f8739 Tim Coleman <[email protected]>
* Attachment.cs MailAddress.cs MailMessage.cs SendCompletedEventHandler.cs
        * SmtpAccess.cs SmtpClient.cs SmtpException.cs SmtpStatusCode.cs:
                New class stubs for 2.0

svn path=/trunk/mcs/; revision=33343
2004-09-04 19:49:50 +00:00