Show / Hide Table of Contents

Class OutgoingMailSession

Class to deal with sessions for outgoing (i.e. SMTP) mail servers.
Instantiate this class with BeginSend(string, string, string).

Inheritance
object
MailSession<ISoOutgoingMailInterface>
OutgoingMailSession
Implements
IAsyncDisposable
Inherited Members
MailSession<ISoOutgoingMailInterface>.LogoutAsync()
MailSession<ISoOutgoingMailInterface>.DisposeAsync()
MailSession<ISoOutgoingMailInterface>.Server
MailSession<ISoOutgoingMailInterface>.UserName
MailSession<ISoOutgoingMailInterface>.UseSSL
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.CRM.Mail
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public sealed class OutgoingMailSession : MailSession<ISoOutgoingMailInterface>, IAsyncDisposable

Methods

SendEMailAsync(MailItem, CancellationToken)

Send the provided e-mail to the server

Declaration
public Task<MailItem> SendEMailAsync(MailItem email, CancellationToken cancellationToken = default)
Parameters
Type Name Description
MailItem email

E-mail to send

CancellationToken cancellationToken
Returns
Type Description
Task<MailItem>

The sent e-mail updated with messageid etc.

ServerLoginAsync(string, string, string, bool, CancellationToken)

Log on to the mail server

Declaration
protected override Task<ISoOutgoingMailInterface> ServerLoginAsync(string server, string userName, string password, bool useSSL, CancellationToken cancellationToken)
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

bool useSSL

Use SSL

CancellationToken cancellationToken
Returns
Type Description
Task<ISoOutgoingMailInterface>

Instance of interface to the mail plugin.

Overrides
MailSession<ISoOutgoingMailInterface>.ServerLoginAsync(string, string, string, bool, CancellationToken)

ServerLoginAsync(string, string, string, CancellationToken)

Log on to the mail server

Declaration
protected override Task<ISoOutgoingMailInterface> ServerLoginAsync(string server, string userName, string password, CancellationToken cancellationToken)
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

CancellationToken cancellationToken
Returns
Type Description
Task<ISoOutgoingMailInterface>

Instance of interface to the mail plugin.

Overrides
MailSession<ISoOutgoingMailInterface>.ServerLoginAsync(string, string, string, CancellationToken)

ServerLogoutAsync()

Log out from the mail server.

Declaration
protected override Task ServerLogoutAsync()
Returns
Type Description
Task
Overrides
MailSession<ISoOutgoingMailInterface>.ServerLogoutAsync()

Implements

System.IAsyncDisposable

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 |  Contribute |  Back to top