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
Get Started
Choose your path to start building with Metigan
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.
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
Read the Installation Guide to set up the SDK in your project
Follow the Quick Start to send your first email in minutes
Explore the API Reference for detailed documentation of all methods
Check out our Guides for best practices and advanced techniques