Table of Contents

Interface IMailtrapClient

Namespace
Mailtrap
Assembly
Mailtrap.Abstractions.dll

Mailtrap API client.

public interface IMailtrapClient : IRestResource
Inherited Members

Methods

Account(long)

Gets resource for specific account, identified by accountId.

IAccountResource Account(long accountId)

Parameters

accountId long

ID of account to get resource for.

Returns

IAccountResource

Resource for the account with specified ID.

Accounts()

Gets account collection resource.

IAccountCollectionResource Accounts()

Returns

IAccountCollectionResource

Account collection resource.

BatchBulk()

Factory method to create batch bulk email client.

IBatchEmailClient BatchBulk()

Returns

IBatchEmailClient

New IBatchEmailClient instance that can be used to send bulk emails in a batch.

BatchEmail()

Gets default batch email client.

Type of the client (transactional, bulk or test) is defined by configuration.

IBatchEmailClient BatchEmail()

Returns

IBatchEmailClient

IBatchEmailClient instance that can be used to send batch emails to the API, specified by configuration.

BatchTest(long)

Factory method to create batch test email client.

IBatchEmailClient BatchTest(long inboxId)

Parameters

inboxId long

ID of the inbox to send test emails to.

Returns

IBatchEmailClient

New IBatchEmailClient instance that can be used to send test emails to the specified inboxId in a batch.

BatchTransactional()

Factory method to create batch transactional email client.

IBatchEmailClient BatchTransactional()

Returns

IBatchEmailClient

New IBatchEmailClient instance that can be used to send transactional emails in a batch.

Bulk()

Factory method to create bulk email client.

ISendEmailClient Bulk()

Returns

ISendEmailClient

New ISendEmailClient instance that can be used to send bulk emails.

Email()

Gets default email client.

Type of the client (transactional, bulk or test) is defined by configuration.

ISendEmailClient Email()

Returns

ISendEmailClient

ISendEmailClient instance that can be used to send emails to the API, specified by configuration.

EmailCampaign(long)

Gets resource for specific email campaign, identified by emailCampaignId.

IEmailCampaignResource EmailCampaign(long emailCampaignId)

Parameters

emailCampaignId long

ID of email campaign to get resource for.

Returns

IEmailCampaignResource

Resource for the email campaign with specified ID.

Exceptions

ArgumentOutOfRangeException

When emailCampaignId is less than or equal to zero.

EmailCampaigns()

Gets the token-scoped email campaign collection resource.

IEmailCampaignCollectionResource EmailCampaigns()

Returns

IEmailCampaignCollectionResource

Email campaign collection resource.

Inbound()

Gets the token-scoped root of the Inbound Email API.

IInboundResource Inbound()

Returns

IInboundResource

Inbound Email API root resource.

Test(long)

Factory method to create test email client.

ISendEmailClient Test(long inboxId)

Parameters

inboxId long

ID of the inbox to send test emails to.

Returns

ISendEmailClient

New ISendEmailClient instance that can be used to send test emails to the specified inboxId.

Transactional()

Factory method to create transactional email client.

ISendEmailClient Transactional()

Returns

ISendEmailClient

New ISendEmailClient instance that can be used to send transactional emails.