# System.Net.Mail

``` diff
 namespace System.Net.Mail {
-    public class SmtpException : Exception, ISerializable {
+    public class SmtpException : Exception {
-        protected SmtpException(SerializationInfo serializationInfo, StreamingContext streamingContext);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected SmtpException(SerializationInfo serializationInfo, StreamingContext streamingContext);
-        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
-        void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
     }
-    public class SmtpFailedRecipientException : SmtpException, ISerializable {
+    public class SmtpFailedRecipientException : SmtpException {
-        protected SmtpFailedRecipientException(SerializationInfo info, StreamingContext context);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected SmtpFailedRecipientException(SerializationInfo info, StreamingContext context);
-        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
-        void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
     }
-    public class SmtpFailedRecipientsException : SmtpFailedRecipientException, ISerializable {
+    public class SmtpFailedRecipientsException : SmtpFailedRecipientException {
-        protected SmtpFailedRecipientsException(SerializationInfo info, StreamingContext context);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        protected SmtpFailedRecipientsException(SerializationInfo info, StreamingContext context);
-        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
+        [EditorBrowsableAttribute(EditorBrowsableState.Never)]
+        [ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
+        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
-        void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext);
     }
 }
```

