Merge pull request #2400 from esdrubal/extrahead
[mono.git] / mcs / class / System.Web / System.Web.Mail / SmtpMail.cs
index c074f44e2fbff0c931f6271be105560d5c8cfea9..3085a930752e064d21b8e45383793e6e4d0f7acc 100644 (file)
@@ -36,24 +36,17 @@ using System.Security.Permissions;
 
 namespace System.Web.Mail
 {
-#if NET_2_0
-#pragma warning disable 618
-#endif
        // CAS
-       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-       [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
-       [Obsolete ("The recommended alternative is System.Net.Mail.SmtpClient.")]
-#endif
+       [Obsolete ("The recommended alternative is System.Net.Mail.SmtpClient. http://go.microsoft.com/fwlink/?linkid=14202")]
        public class SmtpMail
        {
-               private static string smtpServer = "localhost";
+               static string smtpServer = "localhost";
                
-               // Constructor          
-               private SmtpMail ()
+               // Constructor
+               SmtpMail ()
                {
                        /* empty */
-               }               
+               }
 
                // Properties
                public static string SmtpServer {
@@ -73,17 +66,7 @@ namespace System.Web.Mail
                        // access to properties and to add some functionality
                        MailMessageWrapper messageWrapper = new MailMessageWrapper( message );
                        
-#if TARGET_JVM
-                       string currentSmtpServer = smtpServer;
-                       if (currentSmtpServer == "localhost")
-                       {
-                               java.net.InetAddress address = java.net.InetAddress.getLocalHost();
-                               currentSmtpServer = address.getHostAddress();
-                       }
-                       SmtpClient smtp = new SmtpClient (currentSmtpServer);
-#else
                        SmtpClient smtp = new SmtpClient (smtpServer);
-#endif
                        
                        smtp.Send (messageWrapper);
                       
@@ -122,7 +105,4 @@ namespace System.Web.Mail
                        Send (message);
                }
        }
-#if NET_2_0
-#pragma warning restore 618
-#endif
 }