Connecting to Mailersend
The MailerSend API uses API Key authentication via a Bearer token in the Authorization request header.
Using API Key Authentication
Your MailerSend API token is required to create a connection. To obtain your API token:
- Log into your MailerSend account at app.mailersend.com.
- Navigate to Settings > API Tokens in your account dashboard.
- Click Generate new token, provide a name and select the appropriate permissions.
- Copy the generated API token.
After obtaining your API token, set the following connection properties:
- AuthScheme: Set this to APIKey.
- APIKey: Set this to your MailerSend API token.
Example connection string:
Profile=C:\profiles\Mailersend.apip;AuthScheme=APIKey;ProfileSettings='APIKey=your_api_token';
Usage Examples
Activity:
SELECT * FROM Activity WHERE DomainId = 'domain123'
BlockedList:
SELECT * FROM BlockedList
BlocklistMonitors:
SELECT * FROM BlocklistMonitors
DmarcMonitors:
SELECT * FROM DmarcMonitors
DmarcReports:
SELECT * FROM DmarcReports WHERE MonitorId = 'monitor123'
DomainDnsRecords:
SELECT * FROM DomainDnsRecords WHERE DomainId = 'domain123'
DomainRecipients:
SELECT * FROM DomainRecipients WHERE DomainId = 'domain123'
DomainVerification:
SELECT * FROM DomainVerification WHERE DomainId = 'domain123'
Domains:
SELECT * FROM Domains
EmailVerification:
SELECT * FROM EmailVerification
InboundRoutes:
SELECT * FROM InboundRoutes
Invites:
SELECT * FROM Invites
MessageSchedules:
SELECT * FROM MessageSchedules
Messages:
SELECT * FROM Messages
Recipients:
SELECT * FROM Recipients
SenderIdentities:
SELECT * FROM SenderIdentities
SmsActivity:
SELECT * FROM SmsActivity
SmsInboundRoutes:
SELECT * FROM SmsInboundRoutes
SmsMessages:
SELECT * FROM SmsMessages
SmsNumbers:
SELECT * FROM SmsNumbers
SmsRecipients:
SELECT * FROM SmsRecipients
SmtpUsers:
SELECT * FROM SmtpUsers WHERE DomainId = 'domain123'
Templates:
SELECT * FROM Templates
Users:
SELECT * FROM Users
Connection Properties
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider.
| Property | Description |
| APIKey | The API token for the MailerSend account. You can obtain your API token from your MailerSend account dashboard. |
| AuthScheme | The scheme used for authentication. Accepted entries are APIKey. Allowed values are: BASIC, NONE, NTLM, OAUTH, APIKEY, OAUTH_CLIENT |