New test + update
[mono.git] / mcs / class / System.Web / System.Web.Mail / SmtpMail.cs
index d2774c0ca800a5262f2134963bd831ddfa871093..0273f6ae1b46c12c499019445a1196bce6b059e0 100644 (file)
@@ -40,9 +40,9 @@ namespace System.Web.Mail
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
 #if NET_2_0
-       [Obsolete]
+       [Obsolete ("The recommended alternative is System.Net.Mail.SmtpClient.")]
 #endif
-       public class SmtpMail
+       public class SmtpMail
        {
                private static string smtpServer = "localhost";
                
@@ -70,17 +70,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);