Commit Graph
53 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
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
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
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
Miguel de Icaza b35a91a799 2006-12-12 Miguel de Icaza <[email protected]>
* MailMessage.cs: Fix this code so that it correctly reports
	ArgumentNullExceptions.

svn path=/trunk/mcs/; revision=69408
2006-12-12 16:20:29 +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 f72f001879 Date changed
svn path=/trunk/mcs/; revision=69278
2006-12-10 15:32:20 +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
Konstantin Triger eea91ddf6b TARGET_JVM limitations workarounds
svn path=/trunk/mcs/; revision=68950
2006-12-04 14:20:31 +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
Sebastien Pouliot 24c57d8886 2006-10-31 Sebastien Pouliot <[email protected]>
* SmtpException.cs: Fix visibility on .ctor(SerializationInfo,
	StreamingContext).
	* SmtpPermissionAttribute.cs: New (2.0). Security attribute for SMTP.
	* SmtpPermission.cs: New (2.0). Security permission for SMTP.


svn path=/trunk/mcs/; revision=67187
2006-10-31 20:34:35 +00:00
Andrew Skiba fe9f5d4504 TARGET_JVM
svn path=/trunk/mcs/; revision=66025
2006-09-28 13:25:14 +00:00
Miguel de Icaza a5bd130af9 2006-03-11 Miguel de Icaza <[email protected]>
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
	used by us internally).

	Ponder: should we instead move our methods to use new versions of
	the Obsoleted ones?

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeNamespaceImportCollection.cs: It turns out that a lot of the
	errors flagged with "!" were just missing explicit interface
	implementations.  

	Implement.

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeDomConfigurationHandler.cs: Comment out unused methods. 

	* TempFileCollection.cs: Implement explicitly some interface
	methods to get rid of the "!" errors on CorCompare.

2006-03-11  Miguel de Icaza  <[email protected]>

	* Queue.cs: Flag as serializable.

	* LinkedList.cs (OnDeserialization): Fix signature. 

	* SortedList.cs: Implement explicitly a few methods that were
	flagged by corcompare. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
	avoid warning.

2006-03-11  Miguel de Icaza  <[email protected]>

	* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
	internal to avoid warnings.  This routine is called from
	System.Web with MethodInfo.Invoke.

2006-03-11  Miguel de Icaza  <[email protected]>

	* DeflateStream.cs: Comment out DllImport that was not being
	used. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* y

	* SerialPort.cs: Remove unused variable (writeBuffer). 

	* SerialPortStream.cs (Dispose): override, not new.

2006-03-11  Miguel de Icaza  <[email protected]>

	* WebClient.cs: Only expose the right methods to avoid warnings. 

	* FtpDataStream.cs (Dispose): Fix signature.

	* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
	like we are missing features here).

	* IPAddress.cs: Move m_HashCode property to the end, and set
	pragmas to disable warnings.

2006-03-11  Miguel de Icaza  <[email protected]>

	* MailAddress.cs: Comment out unused field to remove warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkChange.cs: Use pragmas to eliminate warnings from events
	that we do not trigger yet.

	This is a candidate for using Aaron's NetworkManager code.  But
	would make us depend on d-bus.

	* NetworkInformationException.cs: Use error_code for ErrorCode,
	instead of NativeErrorCode.   Fixes warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
	need to do this everywhere one day).

	(Close): actually obey the "leaveInnerStreamOpen" setting from the
	constructor. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkStream.cs (Dispose): Use the right signature depending on
	the profile being built.

2006-03-11  Miguel de Icaza  <[email protected]>

	* X509Chain.cs: Flagged member as internal to avoid unused warning.

	* X500DistinguishedName.cs: Comment out unused names and move
	temporary unused variables inside the comments that were removed 



svn path=/trunk/mcs/; revision=57836
2006-03-11 19:07:56 +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 66b6dec06b fix enum value
svn path=/trunk/mcs/; revision=54992
2006-01-03 01:03:10 +00:00
John Luke df04ceaead 2005-12-26 John Luke <[email protected]>
* AttachmentCollection.cs: mark sealed
        * DeliveryNotificationOptions.cs: fix values

svn path=/trunk/mcs/; revision=54851
2005-12-26 17:14:08 +00:00
John Luke 4041414f1b 2005-12-25 John Luke <[email protected]>
* SmtpStatusCode.cs: OK > Ok
        * AttachmentBase.cs: ContentID > ContentId,
        add set_ContentType
        * AlternateViewCollection.cs: remove destructor,
        make default ctor internal
        * MailMessage.cs: add default ctor,
        remove destructor
        * Attachment.cs: add (string, string) ctor,
        add set_NameEncoding
        * LinkedResourceCollection.cs: remove destructor,
        make default ctor internal
        * AttachmentCollection.cs: mark Dispose virtual,
        add ISerializable, make default ctor internal

svn path=/trunk/mcs/; revision=54844
2005-12-26 04:39:36 +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 b252f551dd 2005-12-24 John Luke <[email protected]>
* MailMessage.cs: use text/plain by default,
        patch by Andy Waddell <[email protected]>,
        fixes bug #76972


svn path=/trunk/mcs/; revision=54834
2005-12-24 17:13:57 +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
Chris Toshok e5742c4738 2005-12-14 Chris Toshok <[email protected]>
* SmtpDeliveryMethod.cs: new enum.


svn path=/trunk/mcs/; revision=54430
2005-12-15 00:46:43 +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