240 references to SR
System.Net.Mail (240)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (2)
134
throw new InvalidOperationException(
SR
.net_completed_result);
157
throw new InvalidOperationException(
SR
.net_completed_result);
System\Net\Base64Stream.cs (1)
103
throw new FormatException(
SR
.MailBase64InvalidCharacter);
System\Net\BufferBuilder.cs (2)
90
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 (4)
158
throw new ArgumentException(
SR
.MailSubjectInvalidFormat);
313
throw new ArgumentException(
SR
.net_io_invalidasyncresult);
318
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidendcall, nameof(EndSend)));
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 (22)
164
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
189
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
212
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
230
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
253
throw new InvalidOperationException(
SR
.SmtpInvalidOperationDuringSend);
373
throw new SmtpException(
SR
.SmtpNeedAbsolutePickupDirectory);
422
throw new InvalidOperationException(
SR
.net_inasync);
432
throw new InvalidOperationException(
SR
.SmtpFromRequired);
459
throw new InvalidOperationException(
SR
.SmtpRecipientRequired);
476
throw new NotSupportedException(
SR
.SmtpGetIisPickupDirectoryNotSupported);
481
throw new SmtpException(
SR
.SmtpPickupDirectoryDoesnotSupportSsl);
521
throw new SmtpException(
SR
.net_timeout);
531
throw new SmtpException(
SR
.SmtpSendMailFailure, e);
554
throw new InvalidOperationException(
SR
.net_inasync);
566
throw new InvalidOperationException(
SR
.SmtpFromRequired);
593
throw new InvalidOperationException(
SR
.SmtpRecipientRequired);
610
throw new NotSupportedException(
SR
.SmtpGetIisPickupDirectoryNotSupported);
616
throw new SmtpException(
SR
.SmtpPickupDirectoryDoesnotSupportSsl);
679
throw new SmtpException(
SR
.SmtpSendMailFailure, e);
816
throw new InvalidOperationException(
SR
.UnspecifiedHost);
820
throw new InvalidOperationException(
SR
.InvalidPort);
852
exception = new SmtpException(
SR
.SmtpSendMailFailure, exception);
System\Net\Mail\SmtpCommands.cs (17)
209
throw new SmtpException(
SR
.SmtpAuthResponseInvalid);
269
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, serverResponse);
288
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
321
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, serverResponse);
333
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
359
throw new SmtpException(
SR
.SmtpEhloResponseInvalid);
365
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, lines[0].Line);
386
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
421
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, serverResponse);
440
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
479
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, response);
498
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
538
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, response);
557
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
608
throw new SmtpException(
SR
.net_webstatus_ServerProtocolViolation, response);
626
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
649
throw new InvalidOperationException(
SR
.SmtpDataStreamOpen);
System\Net\Mail\SmtpConnection.cs (7)
189
throw new InvalidOperationException(
SR
.SmtpAlreadyConnected);
230
throw new SmtpException(
SR
.MailServerDoesNotSupportStartTls);
286
throw new SmtpException(
SR
.SmtpAuthenticationFailed);
425
throw new InvalidOperationException(
SR
.SmtpAlreadyConnected);
560
throw new SmtpException(
SR
.MailServerDoesNotSupportStartTls);
619
throw new SmtpException(
SR
.MailServerDoesNotSupportStartTls);
834
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)
114
throw new IOException(
SR
.Format(
SR
.net_io_readfailure,
SR
.net_io_connectionclosed));
134
throw new FormatException(
SR
.SmtpInvalidResponse);
151
throw new FormatException(
SR
.SmtpInvalidResponse);
168
throw new FormatException(
SR
.SmtpInvalidResponse);
193
throw new FormatException(
SR
.SmtpInvalidResponse);
217
throw new FormatException(
SR
.SmtpInvalidResponse);
247
throw new FormatException(
SR
.SmtpInvalidResponse);
452
throw new IOException(
SR
.Format(
SR
.net_io_readfailure,
SR
.net_io_connectionclosed));
System\Net\Mail\SmtpTransport.cs (1)
136
throw new SmtpException(
SR
.MailHostNotFound, innerException);
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)
50
throw new InvalidOperationException(
SR
.MailWriterIsInContent);
106
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\MimeBasePart.cs (3)
208
throw new ArgumentException(
SR
.net_io_invalidasyncresult, nameof(asyncResult));
213
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidendcall, nameof(EndSend)));
System\Net\Mime\MimePart.cs (3)
99
throw new NotSupportedException(
SR
.Format(
SR
.MimeTransferEncodingNotSupported, value));
360
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);