Search Results for

    Show / Hide Table of Contents

    Interface ISmtpConnectable

    This interface provides extended methods in addition to the IConnectable interface. It supprots SMTP connections to send emails with a minimal interface.

    Inherited Members
    IConnectable.Connected
    IConnectable.Disconnected
    IConnectable.Completed
    IConnectable.Failed
    IConnectable.IsConnected
    IConnectable.Connect()
    IConnectable.Disconnect()
    Namespace: TeleScope.Connectors.Smtp.Abstractions
    Assembly: TeleScope.Connectors.Smtp.Abstractions.dll
    Syntax
    public interface ISmtpConnectable : IConnectable

    Methods

    | Improve this Doc View Source

    Attach(FileInfo, String)

    This method should attach a file to the latest email.

    Declaration
    ISmtpConnectable Attach(FileInfo file, string mimeType = null)
    Parameters
    Type Name Description
    FileInfo file

    The file info object that will be attached.

    System.String mimeType

    The mime type of the file.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    BlindCarbonCopy(String)

    This method should add a bcc (blind carbon body) address to the last email that was created by the last call of NewMessage.

    Declaration
    ISmtpConnectable BlindCarbonCopy(string to)
    Parameters
    Type Name Description
    System.String to

    The email address of the receiver.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    BlindCarbonCopy(String[])

    This method should add a bcc (blind carbon body) address to the last email that was created by the last call of NewMessage.

    Declaration
    ISmtpConnectable BlindCarbonCopy(string[] to)
    Parameters
    Type Name Description
    System.String[] to

    The email addresses of the receivers.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    CarbonCopy(String)

    This method should add a cc (carbon body) address to the last email that was created by the last call of NewMessage.

    Declaration
    ISmtpConnectable CarbonCopy(string to)
    Parameters
    Type Name Description
    System.String to

    The email address of the receiver.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    CarbonCopy(String[])

    This method should add a cc (carbon body) address to the last email that was created by the last call of NewMessage.

    Declaration
    ISmtpConnectable CarbonCopy(string[] to)
    Parameters
    Type Name Description
    System.String[] to

    The email addresses of the receivers.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    HighPriority()

    This method should add a high priority flag to the latest email.

    Declaration
    ISmtpConnectable HighPriority()
    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    LowPriority()

    This method should add a low priority flag to the latest email.

    Declaration
    ISmtpConnectable LowPriority()
    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    NewMessage(String, String)

    This method should add a new message to an internal collection with only specific properties, needed to build a new email object. Sender and receivers should be known by the implementing instace beforehand.

    Declaration
    ISmtpConnectable NewMessage(string subject, string body)
    Parameters
    Type Name Description
    System.String subject

    The subject of the email.

    System.String body

    The message of the email.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    NewMessage(String, String, String, String)

    This method should add a new message to an internal collection with the essetial properties, needed to build a new email object.

    Declaration
    ISmtpConnectable NewMessage(string from, string to, string subject, string body)
    Parameters
    Type Name Description
    System.String from

    The email address of the sender.

    System.String to

    The email address of the receiver.

    System.String subject

    The subject of the email.

    System.String body

    The message of the email.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    NewMessage(String, String[], String, String)

    This method should add a new message to an internal collection with the essetial properties needed to build an email object.

    Declaration
    ISmtpConnectable NewMessage(string from, string[] to, string subject, string body)
    Parameters
    Type Name Description
    System.String from

    The email address of the sender.

    System.String[] to

    The email addresses of the receivers.

    System.String subject

    The subject of the email.

    System.String body

    The message of the email.

    Returns
    Type Description
    ISmtpConnectable

    Returns the calling instance to enable chaining method calls.

    | Improve this Doc View Source

    Send()

    This method should send all the created and configured emails at once and clear its inner stack.

    Declaration
    (int total, int success, int failed) Send()
    Returns
    Type Description
    System.ValueTuple<System.Int32, System.Int32, System.Int32>

    Returns a result triple that contains the total amount of sent emails, the sucessful and the failed ones.

    • GITHUB
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    Copyright 2020-2022 TeleScope-dotnet. Generated by DocFX.
    ☀
    ☾