220 references to SR
System.Net.Mail (220)
System\Net\Base64Stream.cs (1)
103
throw new FormatException(
SR
.MailBase64InvalidCharacter);
System\Net\BufferBuilder.cs (2)
97
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, c));
System\Net\DelegatedStream.cs (14)
35
throw new NotSupportedException(
SR
.SeekNotSupported);
46
throw new NotSupportedException(
SR
.SeekNotSupported);
53
throw new NotSupportedException(
SR
.SeekNotSupported);
116
throw new NotSupportedException(
SR
.ReadNotSupported);
124
throw new NotSupportedException(
SR
.ReadNotSupported);
133
throw new NotSupportedException(
SR
.ReadNotSupported);
142
throw new NotSupportedException(
SR
.ReadNotSupported);
150
throw new NotSupportedException(
SR
.ReadNotSupported);
159
throw new NotSupportedException(
SR
.SeekNotSupported);
167
throw new NotSupportedException(
SR
.SeekNotSupported);
175
throw new NotSupportedException(
SR
.WriteNotSupported);
183
throw new NotSupportedException(
SR
.WriteNotSupported);
192
throw new NotSupportedException(
SR
.WriteNotSupported);
201
throw new NotSupportedException(
SR
.WriteNotSupported);
System\Net\Mail\Attachment.cs (4)
138
throw new ArgumentException(
SR
.MediaTypeInvalid, nameof(mediaType));
142
throw new ArgumentException(
SR
.MediaTypeInvalid, nameof(mediaType));
147
throw new ArgumentException(
SR
.MediaTypeInvalid, nameof(mediaType));
224
throw new ArgumentException(
SR
.MailHeaderInvalidCID, nameof(value));
System\Net\Mail\DomainLiteralReader.cs (4)
78
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
97
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter,
System\Net\Mail\DotAtomReader.cs (6)
60
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
72
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, MailBnfHelper.ConsecutiveDots));
85
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, MailBnfHelper.Dot));
System\Net\Mail\MailAddress.cs (6)
189
throw new SmtpException(
SR
.Format(
SR
.SmtpNonAsciiUserNotSupported, Address));
216
throw new SmtpException(
SR
.Format(
SR
.SmtpInvalidHostName, Address), argEx);
222
throw new SmtpException(
SR
.Format(
SR
.SmtpInvalidHostName, Address));
System\Net\Mail\MailAddressParser.cs (9)
102
throw new FormatException(
SR
.MailAddressInvalidFormat);
138
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter,
183
throw new FormatException(
SR
.MailAddressInvalidFormat);
318
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
401
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
447
throw new FormatException(
SR
.MailAddressInvalidFormat, e);
System\Net\Mail\MailBnfHelper.cs (14)
128
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[offset]));
140
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[offset]));
152
throw new FormatException(
SR
.InvalidHeaderName);
197
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[offset]));
202
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[offset]));
210
throw new FormatException(
SR
.MailHeaderFieldMalformedHeader);
236
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, span[i]));
348
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, ch));
System\Net\Mail\MailPriority.cs (1)
162
throw new ArgumentException(
SR
.MailSubjectInvalidFormat);
System\Net\Mail\QuotedPairReader.cs (2)
61
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
System\Net\Mail\QuotedStringFormatReader.cs (6)
83
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
102
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, MailBnfHelper.Quote));
165
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
System\Net\Mail\SmtpClient.cs (15)
156
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
181
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
204
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
222
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
245
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
365
throw new SmtpException(
SR
.SmtpNeedAbsolutePickupDirectory);
438
return (ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(
SR
.net_inasync)), true);
457
throw new InvalidOperationException(
SR
.SmtpFromRequired);
484
throw new InvalidOperationException(
SR
.SmtpRecipientRequired);
500
throw new NotSupportedException(
SR
.SmtpGetIisPickupDirectoryNotSupported);
505
throw new SmtpException(
SR
.SmtpPickupDirectoryDoesnotSupportSsl);
554
return ExceptionDispatchInfo.SetCurrentStackTrace(new SmtpException(
SR
.net_timeout));
566
return ExceptionDispatchInfo.SetCurrentStackTrace(new SmtpException(
SR
.SmtpSendMailFailure, e));
701
throw new InvalidOperationException(
SR
.UnspecifiedHost);
705
throw new InvalidOperationException(
SR
.InvalidPort);
System\Net\Mail\SmtpCommands.cs (17)
58
throw new SmtpException(
SR
.SmtpAuthResponseInvalid);
104
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, serverResponse);
116
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
149
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, serverResponse);
161
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
182
throw new SmtpException(
SR
.SmtpEhloResponseInvalid);
188
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, lines[0].Line);
205
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
236
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, serverResponse);
248
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
281
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, response);
293
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
332
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, response);
344
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
389
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, response);
401
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
424
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
System\Net\Mail\SmtpConnection.cs (3)
98
throw new InvalidOperationException(
SR
.SmtpAlreadyConnected);
154
throw new SmtpException(
SR
.MailServerDoesNotSupportStartTls);
223
throw new SmtpException(
SR
.SmtpAuthenticationFailed);
System\Net\Mail\SmtpException.cs (27)
17
return GetMessageForStatus(statusCode) + " " +
SR
.Format(
SR
.MailServerResponse, serverResponse);
26
return
SR
.SmtpCommandUnrecognized;
28
return
SR
.SmtpSyntaxError;
30
return
SR
.SmtpCommandNotImplemented;
32
return
SR
.SmtpBadCommandSequence;
34
return
SR
.SmtpCommandParameterNotImplemented;
36
return
SR
.SmtpSystemStatus;
38
return
SR
.SmtpHelpMessage;
40
return
SR
.SmtpServiceReady;
42
return
SR
.SmtpServiceClosingTransmissionChannel;
44
return
SR
.SmtpServiceNotAvailable;
46
return
SR
.SmtpOK;
48
return
SR
.SmtpUserNotLocalWillForward;
50
return
SR
.SmtpMailboxBusy;
52
return
SR
.SmtpMailboxUnavailable;
54
return
SR
.SmtpLocalErrorInProcessing;
56
return
SR
.SmtpUserNotLocalTryAlternatePath;
58
return
SR
.SmtpInsufficientStorage;
60
return
SR
.SmtpExceededStorageAllocation;
62
return
SR
.SmtpMailboxNameNotAllowed;
64
return
SR
.SmtpStartMailInput;
66
return
SR
.SmtpTransactionFailed;
68
return
SR
.SmtpClientNotPermitted;
70
return
SR
.SmtpMustIssueStartTlsFirst;
108
internal SmtpException(string message, string? serverResponse) : base(message + " " +
SR
.Format(
SR
.MailServerResponse, serverResponse))
System\Net\Mail\SmtpFailedRecipientsException.cs (2)
49
base(allFailed ?
SR
.SmtpAllRecipientsFailed :
SR
.SmtpRecipientFailed,
System\Net\Mail\SmtpReplyReaderFactory.cs (12)
88
throw new IOException(
SR
.Format(
SR
.net_io_readfailure,
SR
.net_io_connectionclosed));
108
throw new FormatException(
SR
.SmtpInvalidResponse);
125
throw new FormatException(
SR
.SmtpInvalidResponse);
142
throw new FormatException(
SR
.SmtpInvalidResponse);
167
throw new FormatException(
SR
.SmtpInvalidResponse);
191
throw new FormatException(
SR
.SmtpInvalidResponse);
221
throw new FormatException(
SR
.SmtpInvalidResponse);
284
throw new IOException(
SR
.Format(
SR
.net_io_readfailure,
SR
.net_io_connectionclosed));
System\Net\Mail\WhitespaceReader.cs (8)
51
throw new FormatException(
SR
.MailAddressInvalidFormat);
82
throw new FormatException(
SR
.MailAddressInvalidFormat);
157
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter,
179
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data[index]));
206
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, MailBnfHelper.EndComment));
System\Net\Mime\BaseWriter.cs (2)
49
throw new InvalidOperationException(
SR
.MailWriterIsInContent);
103
throw new InvalidOperationException(
SR
.MailWriterIsInContent);
System\Net\Mime\ContentDisposition.cs (8)
37
throw new FormatException(
SR
.ContentDispositionInvalid);
265
throw new FormatException(
SR
.MailHeaderFieldMalformedHeader);
284
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, _disposition[offset - 1]));
299
throw new FormatException(
SR
.MailHeaderFieldMalformedHeader);
306
throw new FormatException(
SR
.ContentDispositionInvalid);
317
throw new FormatException(
SR
.ContentDispositionInvalid);
329
throw new FormatException(
SR
.ContentDispositionInvalid, exception);
System\Net\Mime\ContentType.cs (11)
100
throw new FormatException(
SR
.MediaTypeInvalid);
105
throw new FormatException(
SR
.MediaTypeInvalid);
229
throw new FormatException(
SR
.ContentTypeInvalid);
235
throw new FormatException(
SR
.ContentTypeInvalid);
242
throw new FormatException(
SR
.ContentTypeInvalid);
254
throw new FormatException(
SR
.ContentTypeInvalid);
260
throw new FormatException(
SR
.ContentTypeInvalid);
265
throw new FormatException(
SR
.ContentTypeInvalid);
274
throw new FormatException(
SR
.ContentTypeInvalid);
282
catch (FormatException fe) when (fe.Message !=
SR
.ContentTypeInvalid)
284
throw new FormatException(
SR
.ContentTypeInvalid);
System\Net\Mime\HeaderCollection.cs (1)
77
throw new FormatException(
SR
.InvalidHeaderName);
System\Net\Mime\MimePart.cs (3)
99
throw new NotSupportedException(
SR
.Format(
SR
.MimeTransferEncodingNotSupported, value));
199
throw new InvalidOperationException(
SR
.MimePartCantResetStream);
System\Net\Mime\QEncodedStream.cs (12)
97
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b1));
99
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b2));
114
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b1));
116
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b2));
167
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b1));
169
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b2));
System\Net\Mime\QuotedPrintableStream.cs (12)
126
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b1));
128
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b2));
143
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b1));
145
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b2));
188
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b1));
190
throw new FormatException(
SR
.Format(
SR
.InvalidHexDigit, b2));
System\Net\Mime\SmtpDateTime.cs (14)
181
throw new FormatException(
SR
.MailDateInvalidFormat);
190
throw new FormatException(
SR
.MailDateInvalidFormat);
195
throw new FormatException(
SR
.MailDateInvalidFormat);
203
throw new FormatException(
SR
.MailDateInvalidFormat);
218
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, value));
233
throw new FormatException(
SR
.MailDateInvalidFormat);
243
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data));
253
throw new FormatException(
SR
.Format(
SR
.MailHeaderFieldInvalidCharacter, data));
264
throw new FormatException(
SR
.MailDateInvalidFormat);
284
throw new FormatException(
SR
.MailDateInvalidFormat);
345
throw new FormatException(
SR
.MailDateInvalidFormat);
System\Net\TrackingStringDictionary.cs (4)
28
throw new InvalidOperationException(
SR
.MailCollectionIsReadOnly);
39
throw new InvalidOperationException(
SR
.MailCollectionIsReadOnly);
50
throw new InvalidOperationException(
SR
.MailCollectionIsReadOnly);
64
throw new InvalidOperationException(
SR
.MailCollectionIsReadOnly);