You've already forked linux-packaging-mono
Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
@ -55,15 +55,11 @@ using System.Net.Configuration;
|
||||
using System.Configuration;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
#if NET_4_5
|
||||
using System.Threading.Tasks;
|
||||
#endif
|
||||
|
||||
namespace System.Net.Mail {
|
||||
public class SmtpClient
|
||||
#if NET_4_0
|
||||
: IDisposable
|
||||
#endif
|
||||
{
|
||||
#region Fields
|
||||
|
||||
@ -125,9 +121,7 @@ namespace System.Net.Mail {
|
||||
if (cfg != null) {
|
||||
this.host = cfg.Network.Host;
|
||||
this.port = cfg.Network.Port;
|
||||
#if NET_4_0
|
||||
this.enableSsl = cfg.Network.EnableSsl;
|
||||
#endif
|
||||
TargetName = cfg.Network.TargetName;
|
||||
if (this.TargetName == null)
|
||||
TargetName = "SMTPSVC/" + (host != null ? host : "");
|
||||
@ -174,9 +168,7 @@ namespace System.Net.Mail {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NET_4_0
|
||||
public
|
||||
#endif
|
||||
string TargetName { get; set; }
|
||||
|
||||
public ICredentialsByHost Credentials {
|
||||
@ -264,7 +256,6 @@ namespace System.Net.Mail {
|
||||
#endregion // Events
|
||||
|
||||
#region Methods
|
||||
#if NET_4_0
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
@ -275,7 +266,6 @@ namespace System.Net.Mail {
|
||||
{
|
||||
// TODO: We should close all the connections and abort any async operations here
|
||||
}
|
||||
#endif
|
||||
private void CheckState ()
|
||||
{
|
||||
if (messageInProcess != null)
|
||||
@ -706,13 +696,8 @@ namespace System.Net.Mail {
|
||||
if (message.ReplyToList.Count > 0)
|
||||
SendHeader ("Reply-To", EncodeAddresses (message.ReplyToList));
|
||||
|
||||
#if NET_4_0
|
||||
foreach (string s in message.Headers.AllKeys)
|
||||
SendHeader (s, ContentType.EncodeSubjectRFC2047 (message.Headers [s], message.HeadersEncoding));
|
||||
#else
|
||||
foreach (string s in message.Headers.AllKeys)
|
||||
SendHeader (s, message.Headers [s]);
|
||||
#endif
|
||||
|
||||
AddPriorityHeader (message);
|
||||
|
||||
@ -740,7 +725,6 @@ namespace System.Net.Mail {
|
||||
Send (new MailMessage (from, to, subject, body));
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
public Task SendMailAsync (MailMessage message)
|
||||
{
|
||||
var tcs = new TaskCompletionSource<object> ();
|
||||
@ -775,7 +759,6 @@ namespace System.Net.Mail {
|
||||
|
||||
source.SetResult (null);
|
||||
}
|
||||
#endif
|
||||
|
||||
private void SendDot()
|
||||
{
|
||||
|
Reference in New Issue
Block a user