EmailAccountInfo Class

 

Describes an email account on the hosted email service.

Namespace:   Microsoft.WindowsServerSolutions.HostedEmail
Assembly:  Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)

System::Object
  Microsoft.WindowsServerSolutions.HostedEmail::EmailAccountInfo

public ref class EmailAccountInfo 

NameDescription
System_CAPS_pubmethodEmailAccountInfo()

Creates a new instance of the EmailAccountInfo object.

System_CAPS_pubmethodEmailAccountInfo(IDictionary<String^, String^>^)

Creates a new instance of the EmailAccountInfo object, using the specified extended properties.

NameDescription
System_CAPS_pubpropertyAccountId

Retrieves or sets the account ID.

System_CAPS_pubpropertyAdditionalEmailAddresses

Retrieves or sets a collection containing additional email addresses associated with the current email account.

System_CAPS_pubpropertyDisplayName

Retrieves or sets the display name.

System_CAPS_pubpropertyEnabled

Retrieves or sets a value that indicates whether the email account information is enabled.

System_CAPS_pubpropertyExtendedProperties

Retrieves or sets a collection of optional, extended properties, as defined by the hosted email adapter.

System_CAPS_pubpropertyFirstName

Retrieves or sets the first name of the email account user.

System_CAPS_pubpropertyLastName

Retrieves or sets the last name of the email account user.

System_CAPS_pubpropertyPrimaryEmailAddress

Retrieves or sets the primary email address of the account.

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToPwdSyncUser(String^)

Synchronizes the password of the local user.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Overrides Object::ToString().)

This object is used primarily as a parameter in calls to create and update an email account. Such calls are most often made using the HostedEmailManager object.

For more information about retrieving email account information, see Working with a Hosted Email Service.

The following code describes using the EmailAccountInfo object as a parameter to create a new account. For the complete sample, see Quickstart: Creating a Hosted Email Adapter.


           public EmailAccountInfo AddAccount(EmailAccountInfo info)
{
    lock (this)
    {
        if (ContainsPrimaryEmailAddress(info.PrimaryEmailAddress))
        {
            throw new AccountExistsException();
        }

        var accountId = Guid.NewGuid().ToString();
        info.AccountId = accountId;
        var accounts = LoadAccounts();
        accounts.Add(accountId, info);
        SaveAccounts(accounts);

        return info;
    }

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Community Additions

ADD
Show: