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)
52_from = new MailAddress(from);
47 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 (45)
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)
61public MailMessage(MailAddress from, MailAddress to) 70public MailAddress? From 84public MailAddress? Sender 97public MailAddress? ReplyTo
System\Net\Mail\MailPriority.cs (12)
24private MailAddress? _from; 25private MailAddress? _sender; 27private MailAddress? _replyTo; 59internal Message(MailAddress from, MailAddress to) : this() 82internal MailAddress? From 96internal MailAddress? Sender 109internal MailAddress? ReplyTo 280MailAddress sender = Sender ?? From!; 287foreach (MailAddress address in To) 291foreach (MailAddress address in CC) 295foreach (MailAddress address in Bcc)
System\Net\Mail\SmtpClient.cs (4)
462foreach (MailAddress address in message.To) 469foreach (MailAddress address in message.Bcc) 476foreach (MailAddress address in message.CC) 725foreach (MailAddress address in recipients)
System\Net\Mail\SmtpCommands.cs (2)
303internal static Task SendAsync<TIOAdapter>(SmtpConnection conn, ReadOnlySpan<byte> command, MailAddress from, bool allowUnicode, CancellationToken cancellationToken = default) 340private static void PrepareCommand(SmtpConnection conn, ReadOnlySpan<byte> command, MailAddress from, bool allowUnicode)
System\Net\Mail\SmtpTransport.cs (2)
112internal async Task<(MailWriter, List<SmtpFailedRecipientException>?)> SendMailAsync<TIOAdapter>(MailAddress sender, MailAddressCollection recipients, string deliveryNotify, bool allowUnicode, CancellationToken cancellationToken = default) 121foreach (MailAddress address in recipients)