EmailAccountInfo Class

 

Describes an email account on the hosted email service.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsServerSolutions.HostedEmail.EmailAccountInfo

Syntax

public class EmailAccountInfo
public ref class EmailAccountInfo 
Public Class EmailAccountInfo

Constructors

Name Description
System_CAPS_pubmethod EmailAccountInfo()

Creates a new instance of the EmailAccountInfo object.

System_CAPS_pubmethod EmailAccountInfo(IDictionary<String, String>)

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

Properties

Name Description
System_CAPS_pubproperty AccountId

Retrieves or sets the account ID.

System_CAPS_pubproperty AdditionalEmailAddresses

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

System_CAPS_pubproperty DisplayName

Retrieves or sets the display name.

System_CAPS_pubproperty Enabled

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

System_CAPS_pubproperty ExtendedProperties

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

System_CAPS_pubproperty FirstName

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

System_CAPS_pubproperty LastName

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

System_CAPS_pubproperty PrimaryEmailAddress

Retrieves or sets the primary email address of the account.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToPwdSyncUser(String)

Synchronizes the password of the local user.

System_CAPS_pubmethod ToString()

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

Remarks

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.

Examples

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;
    }

Thread Safety

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

See Also

Microsoft.WindowsServerSolutions.HostedEmail Namespace
How to: Manage the Hosted Email Service

Return to top