Getting Started with Mailblock SDK
This guide will help you get up and running with the Mailblock SDK in just a few minutes.Prerequisites
- Node.js 14 or higher
- A Mailblock API key MailBlock
Installation
Install the SDK using npm:Basic Setup
- first follow the steps from: Basic Setup
Sending Your First Email
Here’s how to send a simple email:Using Method Chaining
The SDK also supports a fluent, chainable API:Sending HTML Emails
You can send rich HTML emails instead of plain text:Sending to Multiple Recipients
Send emails to multiple people with CC and BCC support:Scheduling Emails
Schedule emails to be sent at a future date and time:Managing Scheduled Emails
Canceling Scheduled Emails
Cancel scheduled emails before they’re sent:Updating Scheduled Emails
Modify scheduled emails before they’re sent:Environment Configuration
For production applications, use environment variables for your API key:Debug Mode
Enable debug mode during development to see detailed logs:- Request details and timing
- API responses
- Error information
- Performance metrics
TypeScript Support
The SDK includes full TypeScript support out of the box:Error Handling
The SDK uses a consistent response format that makes error handling straightforward:Next Steps
Now that you’ve sent your first email, you might want to:- Explore the full API reference
- See more examples
- Learn about error handling
- Check out advanced configuration options
Need Help?
- 💬 GitHub Issues
- 📧 Email support: contact@block-forge.de