HostedEmailSupportContactInfo Class
Contains the support contact information for a hosted email service.
Namespace: Microsoft.WindowsServerSolutions.HostedEmail
Assembly: Wssg.HostedEmailObjectModel (in Wssg.HostedEmailObjectModel.dll)
Inheritance Hierarchy
System.Object
Microsoft.WindowsServerSolutions.HostedEmail.HostedEmailSupportContactInfo
Syntax
public class HostedEmailSupportContactInfo
public ref class HostedEmailSupportContactInfo
Public Class HostedEmailSupportContactInfo
Constructors
Name | Description | |
---|---|---|
HostedEmailSupportContactInfo() | Creates a new instance of the HostedEmailSupportContactInfo object. |
Properties
Name | Description | |
---|---|---|
EmailAddress | Retrieves the email address for the support contact. |
|
PhoneNumber | Retrieves the phone number for the support contact. |
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 using HostedEmailSupportContactInfo to display the contact support information to a user. For the complete sample, see 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