Getting started
Admin permissions
By default, the admin role starts with all permissions needed for managing Bizzkit Mail.
Before you can send an email
Some setup is required before it is possible to send an email. This can be done using the SDK, plain HTTP, or simply using the Admin/Swagger UI. This guide interacts with the Swagger UI. See the full API reference here.
Info
You can choose to follow along by simply using the admin site instead of Swagger, this also eliminates keeping track of identifiers, etc.
The concepts reside under https://<MAIL_ADMIN_DOMAIN>/settings.
- Go to
https://<MAIL_API_DOMAIN>/swagger/index.htmlto access the Swagger site. - Authorize.
Configuring an SMTP Server
The first step is to set up the information required to contact your SMTP server.
Request POST /api/mail-providers/smtp-servers with body:
Replace host, port, username, and password with appropriate values.
Note down the identifier from the API response, it will be used in the next step.
Info
If you don't have an SMTP server available for testing, some free alternatives are available: Ethereal, Mailtrap
Configuring a Mail Policy
Next up, we will create a Mail Policy. These define how to prioritize emails, their retention periods, and more.
Request POST /api/mail-policies with body:
Ensure mailProviderId is correct.
Note down the identifier from the API response, it will be used when sending a mail.
(Optional) Create a Shared Attachment
Request POST /api/shared-attachments with:
- Query parameters:
key=my-first-shared-attachment, and leavefileNameempty. - Choose a file for the body
The attachment can be referenced when sending a mail, simply by the key specified.
Sending your first email
With the previous steps completed, it is now possible to enqueue a mail for dispatch. This can be done using the SDK, plain HTTP, or simply using the Swagger UI. This guide interacts with the Swagger UI. See the full API reference here.
Request POST /api/mails with body:
Replace fromAddress and toAddress with appropriate values.
Omit sharedAttachments from the request if you did not create a shared attachment. Ensure mailPolicyId is correct.
Keeping track of emails
Go to https://<MAIL_ADMIN_DOMAIN>/ to access the admin site, which will give an overview of all stored emails and their statuses.
- Click the mail you just sent to view its details
- Here you can view its information, content and error history if anything went wrong.