Show / Hide Table of Contents

Class MailSession<TMailInterface>

Base class for sessions to mail servers

Inheritance
Object
MailSession<TMailInterface>
MessageStoreSession
OutgoingMailSession
Implements
IDisposable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Mail
Assembly: SoDataBase.dll
Syntax
public abstract class MailSession<TMailInterface> : IDisposable where TMailInterface : class, IPlugin
Type Parameters
Name Description
TMailInterface

Constructors

MailSession(String)

Default construction used when no authentication is required.

Declaration
protected MailSession(string server)
Parameters
Type Name Description
String server

Name of mail server with optional port.

MailSession(String, String, String)

Default constructor used when authentication is required.

Declaration
protected MailSession(string server, string userName, string password)
Parameters
Type Name Description
String server

Name of mail server with optional port.

String userName

User name used to authenticate to the mail server

String password

Password used to authenticate to the mail server

MailSession(String, String, String, Boolean)

Default constructor used when authentication is required.

Declaration
protected MailSession(string server, string userName, string password, bool useSSL)
Parameters
Type Name Description
String server

Name of mail server with optional port.

String userName

User name used to authenticate to the mail server

String password

Password used to authenticate to the mail server

Boolean useSSL

Use SSL

Properties

MailInterface

Get reference to the mail interface. This is null when there are no connections to the mail server.

Declaration
protected TMailInterface MailInterface { get; }
Property Value
Type Description
TMailInterface

Password

Get password used to authenticate to the mail server

Declaration
protected string Password { get; set; }
Property Value
Type Description
String

Server

Get name of server with optional port Server[:Port]

Declaration
public string Server { get; }
Property Value
Type Description
String

UserName

Get user name used to authenticate to the mail server

Declaration
public string UserName { get; }
Property Value
Type Description
String

UseSSL

Should we use SSL

Declaration
public bool UseSSL { get; }
Property Value
Type Description
Boolean

Methods

Dispose()

Log out from the mail server.

Declaration
public void Dispose()

Logout()

Log out from the mail server.

Declaration
public void Logout()

ServerLogin(String, String, String)

Implemented in sub classes to log on to the mail server.

Declaration
protected abstract TMailInterface ServerLogin(string server, string userName, string password)
Parameters
Type Name Description
String server

Name of mail server with optional port.

String userName

User name used to authenticate to the mail server

String password

Password used to authenticate to the mail server

Returns
Type Description
TMailInterface

Instance of interface to the mail plugin.

ServerLogin(String, String, String, Boolean)

Implemented in sub classes to log on to the mail server.

Declaration
protected abstract TMailInterface ServerLogin(string server, string userName, string password, bool useSSL)
Parameters
Type Name Description
String server

Name of mail server with optional port.

String userName

User name used to authenticate to the mail server

String password

Password used to authenticate to the mail server

Boolean useSSL

Use SSL

Returns
Type Description
TMailInterface

Instance of interface to the mail plugin.

ServerLogout()

Implemented in sub classes to log out from the mail server.

Declaration
protected abstract void ServerLogout()

Implements

System.IDisposable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Back to top