GroupAddress Class

An address group, as specified by rfc0822.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public class GroupAddress : InternetAddress
Inheritance
Object    InternetAddress    GroupAddress

Remarks

Group addresses are rarely used anymore. Typically, if you see a group address, it will be of the form: "undisclosed-recipients: ;".

Example

C#
                    public static void AddGroupRecipients (MimeMessage message)
{
    // A group address is a named list of mailboxes. It will be serialized as:
    // Friends: Rachel Green <rachel@friends.com>, Ross Geller <ross@friends.com>;
    var friends = new GroupAddress ("Friends");
    friends.Members.Add (new MailboxAddress ("Rachel Green", "rachel@friends.com"));
    friends.Members.Add (new MailboxAddress ("Ross Geller", "ross@friends.com"));

    message.To.Add (friends);

    // A group with no members is a common way of hiding the list of recipients
    // and will be serialized as: undisclosed-recipients: ;
    message.Cc.Add (new GroupAddress ("undisclosed-recipients"));
}
                  

Constructors

GroupAddress(String) Initialize a new instance of the GroupAddress class.
GroupAddress(Encoding, String) Initialize a new instance of the GroupAddress class.
GroupAddress(String, IEnumerableInternetAddress) Initialize a new instance of the GroupAddress class.
GroupAddress(Encoding, String, IEnumerableInternetAddress) Initialize a new instance of the GroupAddress class.

Properties

Encoding Get or set the character encoding to use when encoding the name of the address.
(Inherited from InternetAddress)
Members Get the members of the group.
Name Get or set the display name of the address.
(Inherited from InternetAddress)

Methods

Clone Clone the group address.
(Overrides InternetAddressClone)
CompareTo Compares two internet addresses.
(Inherited from InternetAddress)
Equals(InternetAddress) Determine whether the specified GroupAddress is equal to the current GroupAddress.
(Overrides InternetAddressEquals(InternetAddress))
Equals(Object) Determine whether the specified object is equal to the current object.
(Inherited from InternetAddress)
Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCode Return the hash code for this instance.
(Inherited from InternetAddress)
GetType Gets the Type of the current instance.
(Inherited from Object)
MemberwiseClone Creates a shallow copy of the current Object.
(Inherited from Object)
OnChanged Raise the internal changed event used by MimeMessage to keep headers in sync.
(Inherited from InternetAddress)
Parse(Byte) Parse the given input buffer into a new GroupAddress instance.
Parse(String) Parse the given text into a new GroupAddress instance.
Parse(Byte, Int32) Parse the given input buffer into a new GroupAddress instance.
Parse(ParserOptions, Byte) Parse the given input buffer into a new GroupAddress instance.
Parse(ParserOptions, String) Parse the given text into a new GroupAddress instance.
Parse(Byte, Int32, Int32) Parse the given input buffer into a new GroupAddress instance.
Parse(ParserOptions, Byte, Int32) Parse the given input buffer into a new GroupAddress instance.
Parse(ParserOptions, Byte, Int32, Int32) Parse the given input buffer into a new GroupAddress instance.
ToString Serialize an InternetAddress to a string suitable for display.
(Inherited from InternetAddress)
ToString(Boolean) Serialize an InternetAddress to a string, optionally encoding it for transport.
(Inherited from InternetAddress)
ToString(FormatOptions, Boolean) Return a string representation of the GroupAddress, optionally encoding it for transport.
(Overrides InternetAddressToString(FormatOptions, Boolean))
TryParse(Byte, GroupAddress) Try to parse the given input buffer into a new GroupAddress instance.
TryParse(String, GroupAddress) Try to parse the given text into a new GroupAddress instance.
TryParse(Byte, Int32, GroupAddress) Try to parse the given input buffer into a new GroupAddress instance.
TryParse(ParserOptions, Byte, GroupAddress) Try to parse the given input buffer into a new GroupAddress instance.
TryParse(ParserOptions, String, GroupAddress) Try to parse the given text into a new GroupAddress instance.
TryParse(Byte, Int32, Int32, GroupAddress) Try to parse the given input buffer into a new GroupAddress instance.
TryParse(ParserOptions, Byte, Int32, GroupAddress) Try to parse the given input buffer into a new GroupAddress instance.
TryParse(ParserOptions, Byte, Int32, Int32, GroupAddress) Try to parse the given input buffer into a new GroupAddress instance.

See Also

Reference