X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web.Mail%2FSmtpMail.cs;h=0273f6ae1b46c12c499019445a1196bce6b059e0;hb=a9be24c5cdb9e0f6a48dc634ffcf3ad70954fe3e;hp=d2774c0ca800a5262f2134963bd831ddfa871093;hpb=8cd1f5e0973ffe4c2180becc8c510acfb9342b30;p=mono.git diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs b/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs index d2774c0ca80..0273f6ae1b4 100644 --- a/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs +++ b/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs @@ -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);