3 instantiations of MailAddress
System.Net.Mail (3)
System\Net\Mail\MailAddress.cs (1)
110result = new MailAddress(parsed.displayName, parsed.user, parsed.host, parsed.displayNameEncoding);
System\Net\Mail\MailAddressParser.cs (1)
44results.Add(new MailAddress(parsedAddress.DisplayName, parsedAddress.User, parsedAddress.Host, null));
System\Net\Mail\MailPriority.cs (1)
50_from = new MailAddress(from);
54 references to MailAddress
netstandard (1)
netstandard.cs (1)
1172[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.MailAddress))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
657[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.MailAddress))]
System.Net.Mail (52)
System\Net\Mail\MailAddress.cs (12)
80/// Create a new <see cref="MailAddress"/>. Does not throw an exception if the MailAddress cannot be created. 83/// <param name="result">When this method returns, contains the <see cref="MailAddress"/> instance if address parsing succeed</param> 84/// <returns>A <see cref="bool"/> value that is true if the <see cref="MailAddress"/> was successfully created; otherwise, false.</returns> 85public static bool TryCreate([NotNullWhen(true)] string? address, [NotNullWhen(true)] out MailAddress? result) => TryCreate(address, displayName: null, out result); 88/// Create a new <see cref="MailAddress"/>. Does not throw an exception if the MailAddress cannot be created. 92/// <param name="result">When this method returns, contains the <see cref="MailAddress"/> instance if address parsing succeed</param> 93/// <returns>A <see cref="bool"/> value that is true if the <see cref="MailAddress"/> was successfully created; otherwise, false.</returns> 94public static bool TryCreate([NotNullWhen(true)] string? address, string? displayName, [NotNullWhen(true)] out MailAddress? result) => TryCreate(address, displayName, displayNameEncoding: null, out result); 97/// Create a new <see cref="MailAddress"/>. Does not throw an exception if the MailAddress cannot be created. 102/// <param name="result">When this method returns, contains the <see cref="MailAddress"/> instance if address parsing succeed</param> 103/// <returns>A <see cref="bool"/> value that is true if the <see cref="MailAddress"/> was successfully created; otherwise, false.</returns> 104public static bool TryCreate([NotNullWhen(true)] string? address, string? displayName, Encoding? displayNameEncoding, [NotNullWhen(true)] out MailAddress? result)
System\Net\Mail\MailAddressCollection.cs (5)
13public class MailAddressCollection : Collection<MailAddress> 26protected override void SetItem(int index, MailAddress item) 33protected override void InsertItem(int index, MailAddress item) 42List<MailAddress> result = MailAddressParser.ParseMultipleAddresses(addresses); 57foreach (MailAddress address in this)
System\Net\Mail\MailAddressParser.cs (3)
37internal static List<MailAddress> ParseMultipleAddresses(string data) 39List<MailAddress> results = new List<MailAddress>();
System\Net\Mail\MailMessage.cs (5)
59public MailMessage(MailAddress from, MailAddress to) 68public MailAddress? From 82public MailAddress? Sender 95public MailAddress? ReplyTo
System\Net\Mail\MailPriority.cs (12)
22private MailAddress? _from; 23private MailAddress? _sender; 25private MailAddress? _replyTo; 57internal Message(MailAddress from, MailAddress to) : this() 80internal MailAddress? From 94internal MailAddress? Sender 107internal MailAddress? ReplyTo 361MailAddress sender = Sender ?? From!; 368foreach (MailAddress address in To) 372foreach (MailAddress address in CC) 376foreach (MailAddress address in Bcc)
System\Net\Mail\SmtpClient.cs (7)
437foreach (MailAddress address in message.To) 444foreach (MailAddress address in message.Bcc) 451foreach (MailAddress address in message.CC) 571foreach (MailAddress address in message.To) 578foreach (MailAddress address in message.Bcc) 585foreach (MailAddress address in message.CC) 979foreach (MailAddress address in recipients)
System\Net\Mail\SmtpCommands.cs (3)
516internal static IAsyncResult BeginSend(SmtpConnection conn, ReadOnlySpan<byte> command, MailAddress from, 553private static void PrepareCommand(SmtpConnection conn, ReadOnlySpan<byte> command, MailAddress from, bool allowUnicode) 569internal static void Send(SmtpConnection conn, ReadOnlySpan<byte> command, MailAddress from, bool allowUnicode)
System\Net\Mail\SmtpTransport.cs (5)
149internal IAsyncResult BeginSendMail(MailAddress sender, MailAddressCollection recipients, 193internal MailWriter SendMail(MailAddress sender, MailAddressCollection recipients, string deliveryNotify, 204foreach (MailAddress address in recipients) 241private readonly MailAddress _from; 253internal SendMailAsyncResult(SmtpConnection connection, MailAddress from, MailAddressCollection toCollection,