Welcome to Metigan

Metigan is a powerful email infrastructure platform that provides everything you need to send transactional and marketing emails at scale. Our SDK makes it easy to integrate Metigan into your applications with just a few lines of code.

Key Features

Everything you need to build powerful email experiences

Email Sending
Send transactional and marketing emails with ease. Support for HTML, attachments, templates, and more.
Contact Management
Create, update, and manage contacts efficiently. Built-in validation and deduplication.
Audiences
Organize contacts into targeted audiences for better segmentation and campaign management.
Email Templates
Create reusable email templates with variable substitution and responsive design support.
Form Builder
Build custom forms with our drag-and-drop form builder. Collect submissions automatically.
Webhooks
Get real-time notifications about email events, form submissions, and more via webhooks.

Quick Example

Here's a simple example to get you started. This example initializes the SDK and sends an email in just a few lines of code.

example.tsTypeScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Metigan from 'metigan';

// Initialize the Metigan client with your API key
const metigan = new Metigan({
  apiKey: 'your_api_key_here'
});

// Send an email
async function sendEmail() {
  try {
    const result = await metigan.email.sendEmail({
      from: 'sender@example.com',
      recipients: ['recipient@example.com'],
      subject: 'Hello from Metigan!',
      content: '<h1>Welcome!</h1><p>This is your first email with Metigan.</p>'
    });

    if ('success' in result && result.success) {
      console.log('Email sent successfully!', result);
    } else {
      console.error('Failed to send email:', result);
    }
  } catch (error) {
    console.error('Error sending email:', error);
  }
}

sendEmail();

What's Next?

Continue your journey with these recommended guides

1Install the SDK

Read the Installation Guide to set up the SDK in your project

2Send Your First Email

Follow the Quick Start to send your first email in minutes

3Explore the API

Explore the API Reference for detailed documentation of all methods

4Learn Best Practices

Check out our Guides for best practices and advanced techniques