Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes a hosted email service.
Namespace: Microsoft.WindowsServerSolutions.HostedEmail
Assembly: Wssg.HostedEmailObjectModel (in Wssg.HostedEmailObjectModel.dll)
Inheritance Hierarchy
System.Object
Microsoft.WindowsServerSolutions.HostedEmail.HostedEmailServiceInfo
Syntax
public class HostedEmailServiceInfo
public ref class HostedEmailServiceInfo
Public Class HostedEmailServiceInfo
Constructors
| Name | Description | |
|---|---|---|
![]() |
HostedEmailServiceInfo() | Creates a new instance of the HostedEmailServiceInfo object. |
Properties
| Name | Description | |
|---|---|---|
![]() |
FullName | Retrieves the full name of a hosted email service. |
![]() |
LogoImagePath | Retrieves the directory path to the logo image for a hosted email service. |
![]() |
Provider | Retrieves the information for the provider associated with the hosted email service. |
![]() |
RetrievePasswordUrl | Retrieves the URL used to retrieve the admin password for the hosted email service. |
![]() |
ServiceDescription | Retrieves a description of the service. |
![]() |
ServiceSignUpUrl | Retrieves the URL used for signing up a user to the hosted email service. |
![]() |
ServiceUserPortal | Retrieves the main entry URL for users to access the hosted email service. |
![]() |
ShortName | Retrieves the short name for the hosted email service. |
![]() |
SupportContact | Retrieves the contact information for the hosted email service. |
Methods
| Name | Description | |
|---|---|---|
![]() |
Equals(Object) | (Inherited from Object.) |
![]() |
Finalize() | (Inherited from Object.) |
![]() |
GetHashCode() | (Inherited from Object.) |
![]() |
GetType() | (Inherited from Object.) |
![]() |
MemberwiseClone() | (Inherited from Object.) |
![]() |
ToString() | (Inherited from Object.) |
Examples
The following code describes loading the HostedEmailServiceInfo in order to display the information to the user. For the complete sample, see Quickstart: Quickstart: Creating a Hosted Email Adapter.
private void LoadIntegratedOrUnintegratedForm()
{
this.SuspendLayout();
Uri serviceWebsite = new Uri(Resources.ContosoServices_DefaultWebUrl);
string phoneNumber = Resources.ContosoServices_DefaultPhoneNumber;
string supportEmail = Resources.ContosoServices_DefaultSupportEmail;
string companyName = Resources.ContosoServices_DefaultCompanyName;
string serviceName = Resources.ContosoServices_DefaultServiceName;
if (!ContosoEmailEnabled)
{
tableLayoutPanelIntegration.Visible = false;
tableLayoutPanelNotIntegration.Visible = true;
tableLayoutPanelSubscription.Visible = false;
//set tableLayoutPanelIntegration's ColumnStyle to AutoSize, so it could auto-hide.
int colPosition = tableLayoutPanelTop.GetColumn(tableLayoutPanelIntegration);
tableLayoutPanelTop.ColumnStyles[colPosition].SizeType = SizeType.AutoSize;
tableLayoutPanelTop.Controls.Remove(tableLayoutPanelIntegration);
tableLayoutPanelTop.Controls.Remove(tableLayoutPanelSubscription);
}
else
{
tableLayoutPanelIntegration.Visible = true;
tableLayoutPanelNotIntegration.Visible = false;
tableLayoutPanelSubscription.Visible = true;
//set tableLayoutPanelNotIntegration's ColumnStyle to AutoSize, so it could auto-hide.
int colPosition = tableLayoutPanelTop.GetColumn(tableLayoutPanelNotIntegration);
tableLayoutPanelTop.ColumnStyles[colPosition].SizeType = SizeType.AutoSize;
tableLayoutPanelTop.Controls.Remove(tableLayoutPanelNotIntegration);
labelSigninAccount.Text = Resources.ContosoServices_DefaultAdminAccount;
try
{
HostedEmailServiceInfo info = HostedEmailIntegrationManager.Configuration.Service;
if (info != null)
{
HostedEmailSupportContactInfo ContosoEmailSupport = info.SupportContact;
if (ContosoEmailSupport != null)
{
phoneNumber = ContosoEmailSupport.PhoneNumber;
supportEmail = ContosoEmailSupport.EmailAddress;
}
if (info.Provider.Name != null)
{
companyName = info.Provider.Name;
serviceWebsite = info.Provider.Website;
}
if (info.ShortName != null)
{
serviceName = info.ShortName;
}
if (CredentialManager.AdminUserName != null)
{
labelSigninAccount.Text = CredentialManager.AdminUserName;
}
}
}
catch (Exception)
{
//Do nothing, use default value.
}
//Show notice for users when addin retrieving data
UpdateDomains(true, false);
UpdateMailBoxNumber(true, false);
//retrieving data
ThreadPool.QueueUserWorkItem((state) =>
{
if (manager.Connect())
{
Manager_ConnectCompleted();
}
else
{
Manager_ConnectFailed();
}
});
}
dashboardLinkLabelContosoURL.LinkUrl = serviceWebsite;
dashboardLinkLabelContosoURL.Text = serviceWebsite.ToString();
labelPhoneNumber.Text = phoneNumber;
labelCompanyName.Text = companyName;
dashboardLinkLabelContosoEmail.Text = supportEmail;
dashboardLinkLabelContosoEmail.LinkUrl = new Uri("mailto:" + supportEmail);
if (ContosoEmailEnabled)
{
labelServerIsIntegratedDescription.Text = string.Format(CultureInfo.CurrentCulture, Resources.ContosoServices_IntegratedDescription, serviceName);
}
else
{
labelServerNotIntegratedDescription.Text = string.Format(CultureInfo.CurrentCulture, Resources.ContosoServices_NotIntegratedDescription, serviceName);
}
this.ResumeLayout();
}
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
Return to top
.jpeg)
.jpeg)
.jpeg)