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
accountIdlongID 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 sandbox) is defined by configuration.
IBatchEmailClient BatchEmail()
Returns
- IBatchEmailClient
IBatchEmailClient instance that can be used to send batch emails to the API, specified by configuration.
BatchSandbox(long)
Factory method to create batch sandbox email client.
IBatchEmailClient BatchSandbox(long sandboxId)
Parameters
sandboxIdlongID of the sandbox to send emails to.
Returns
- IBatchEmailClient
New IBatchEmailClient instance that can be used to send emails to the sandbox with the specified
sandboxIdin a batch.
BatchTest(long)
Factory method to create batch sandbox email client.
[Obsolete("BatchTest(long) is deprecated and will be removed in a future major release; use BatchSandbox(long) instead.")]
IBatchEmailClient BatchTest(long inboxId)
Parameters
inboxIdlongID of the sandbox to send emails to.
Returns
- IBatchEmailClient
New IBatchEmailClient instance that can be used to send emails to the sandbox with the specified
inboxIdin a batch.
Remarks
Deprecated, use BatchSandbox(long) instead.
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.
CompanyInfo(long)
Gets company info resource for the sending domain, identified by domainId.
ICompanyInfoResource CompanyInfo(long domainId)
Parameters
domainIdlongID of the sending domain to get the company info resource for.
Returns
- ICompanyInfoResource
Company info resource for the sending domain with specified ID.
Exceptions
- ArgumentOutOfRangeException
When
domainIdis less than or equal to zero.
Email()
Gets default email client.
Type of the client (transactional, bulk or sandbox) 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
emailCampaignIdlongID of email campaign to get resource for.
Returns
- IEmailCampaignResource
Resource for the email campaign with specified ID.
Exceptions
- ArgumentOutOfRangeException
When
emailCampaignIdis 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.
MarketingStats()
Gets the token-scoped Email Marketing statistics resource.
IMarketingStatsResource MarketingStats()
Returns
- IMarketingStatsResource
Email Marketing statistics resource.
Sandbox(long)
Factory method to create sandbox email client.
ISendEmailClient Sandbox(long sandboxId)
Parameters
sandboxIdlongID of the sandbox to send emails to.
Returns
- ISendEmailClient
New ISendEmailClient instance that can be used to send emails to the sandbox with the specified
sandboxId.
Test(long)
Factory method to create sandbox email client.
[Obsolete("Test(long) is deprecated and will be removed in a future major release; use Sandbox(long) instead.")]
ISendEmailClient Test(long inboxId)
Parameters
inboxIdlongID of the sandbox to send emails to.
Returns
- ISendEmailClient
New ISendEmailClient instance that can be used to send emails to the sandbox with the specified
inboxId.
Remarks
Deprecated, use Sandbox(long) instead.
TrackingOptOut(string)
Gets resource for specific tracking opt-out, identified by trackingOptOutId.
ITrackingOptOutResource TrackingOptOut(string trackingOptOutId)
Parameters
trackingOptOutIdstringID of the tracking opt-out to get resource for.
Returns
- ITrackingOptOutResource
Resource for the tracking opt-out with specified ID.
Exceptions
- ArgumentException
When
trackingOptOutIdis null or empty.
TrackingOptOuts()
Gets the tracking opt-out collection resource.
ITrackingOptOutCollectionResource TrackingOptOuts()
Returns
- ITrackingOptOutCollectionResource
Tracking opt-out collection resource.
Transactional()
Factory method to create transactional email client.
ISendEmailClient Transactional()
Returns
- ISendEmailClient
New ISendEmailClient instance that can be used to send transactional emails.