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 | |
---|---|---|
EmailAccountInfo() | Creates a new instance of the EmailAccountInfo object. |
|
EmailAccountInfo(IDictionary<String, String>) | Creates a new instance of the EmailAccountInfo object, using the specified extended properties. |
Properties
Name | Description | |
---|---|---|
AccountId | Retrieves or sets the account ID. |
|
AdditionalEmailAddresses | Retrieves or sets a collection containing additional email addresses associated with the current email account. |
|
DisplayName | Retrieves or sets the display name. |
|
Enabled | Retrieves or sets a value that indicates whether the email account information is enabled. |
|
ExtendedProperties | Retrieves or sets a collection of optional, extended properties, as defined by the hosted email adapter. |
|
FirstName | Retrieves or sets the first name of the email account user. |
|
LastName | Retrieves or sets the last name of the email account user. |
|
PrimaryEmailAddress | Retrieves or sets the primary email address of the account. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
ToPwdSyncUser(String) | Synchronizes the password of the local user. |
|
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