Mailerlite Email Marketing
Set up email marketing and newsletters with Mailerlite for your AI SaaS landing page.
What is Mailerlite?
Mailerlite is an email marketing platform that helps you:
- Collect email subscribers
- Send newsletters and campaigns
- Create automated email sequences
- Track engagement and analytics
- Build your audience
Why Mailerlite?
- š§ Easy to Use - Intuitive interface and email builder
- š Free Tier - Up to 1,000 subscribers free
- š Analytics - Track opens, clicks, and conversions
- š¤ Automation - Set up email sequences
- šØ Beautiful Templates - Pre-designed email templates
Setup Guide
1. Create Mailerlite Account
- Go to mailerlite.com and sign up
- Verify your email address
- Complete your profile setup
2. Get API Key
- Click your profile icon ā Integrations
- Go to Mailerlite API
- Click Generate new token
- Copy the API key
Add to .env.local:
MAILERLITE_API_KEY=eyJ...
3. Create a Group
Groups organize your subscribers:
- Go to Subscribers ā Groups
- Click Create Group
- Name it:
Newsletter SubscribersorLanding Page Leads - Copy the Group ID (you'll need this)
Landing Page Integration
Your landing page includes an email signup form. Here's how it works:
Email Signup Form
Located in your homepage (page.tsx):
const handleSubscribe = async (e: React.FormEvent) => {
e.preventDefault();
setIsSubscribing(true);
try {
const response = await fetch('/api/subscribe', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email }),
});
if (response.ok) {
setSubscribeMessage('Thanks for subscribing!');
setEmail('');
}
} catch (error) {
setSubscribeMessage('Something went wrong. Try again.');
}
setIsSubscribing(false);
};
API Route
Create /api/subscribe/route.ts:
import { NextResponse } from 'next/server';
const MAILERLITE_API_KEY = process.env.MAILERLITE_API_KEY;
const MAILERLITE_GROUP_ID = process.env.MAILERLITE_GROUP_ID;
export async function POST(req: Request) {
const { email } = await req.json();
if (!email) {
return NextResponse.json(
{ error: 'Email required' },
{ status: 400 }
);
}
try {
const response = await fetch(
'https://connect.mailerlite.com/api/subscribers',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${MAILERLITE_API_KEY}`,
},
body: JSON.stringify({
email,
groups: [MAILERLITE_GROUP_ID],
}),
}
);
if (!response.ok) {
throw new Error('Failed to subscribe');
}
return NextResponse.json({ success: true });
} catch (error) {
return NextResponse.json(
{ error: 'Failed to subscribe' },
{ status: 500 }
);
}
}
Environment Variables
Add to .env.local:
MAILERLITE_API_KEY=eyJ...
MAILERLITE_GROUP_ID=123456789
Email Campaigns
Welcome Email Sequence
Set up an automated welcome sequence:
- Go to Automation ā Create Workflow
- Trigger: Subscriber joins a group
- Add emails:
- Email 1: Welcome + introduce your product (send immediately)
- Email 2: Share a success story (send after 2 days)
- Email 3: Special offer or call-to-action (send after 5 days)
Newsletter Campaign
Send one-time campaigns:
- Go to Campaigns ā Create Campaign
- Choose Regular Campaign
- Design your email
- Select your subscriber group
- Schedule or send immediately
Email Templates
Welcome Email Example
Subject: Welcome to ArchitectGBT! š
Hi there!
Thanks for joining our community. ArchitectGBT helps you find the perfect AI model for your project in seconds.
Here's what you can do:
ā Get instant AI model recommendations
ā Compare costs across 20+ models
ā Download production-ready code templates
Ready to get started?
[Get Started Now]
Best,
The ArchitectGBT Team
Product Update Email
Subject: New AI Models Added! GPT-5 & Claude Opus 4.5
Hi,
Big news! We've just added the latest AI models:
š¤ GPT-5.1 - OpenAI's smartest model yet
š§ Claude Opus 4.5 - Best for coding
ā” Gemini 2.5 Flash - Fastest & cheapest
Check them out on your dashboard:
[View New Models]
Happy building!
Tracking & Analytics
Monitor your email performance:
- Go to Campaigns ā Select campaign
- View metrics:
- Open Rate - How many opened your email
- Click Rate - How many clicked links
- Unsubscribe Rate - Who opted out
- Bounce Rate - Invalid emails
Aim for:
- Open rate: 20%+
- Click rate: 2-5%
- Unsubscribe rate: less than 0.5%
Best Practices
Growing Your List
- Add signup form to your landing page ā
- Offer incentive (free template, guide, etc.)
- Share preview of what subscribers get
- Make unsubscribing easy
Email Content
- Write compelling subject lines (keep under 50 chars)
- Personalize with first name
- Include clear call-to-action
- Mobile-friendly design
- Test before sending
Compliance
- Include unsubscribe link (Mailerlite adds automatically)
- Add your physical address
- Only email people who opted in
- Follow GDPR/CAN-SPAM laws
Segmentation
Create targeted segments:
- New Subscribers - Welcome sequence
- Active Users - Product updates
- Inactive Users - Re-engagement campaign
- Pro Users - Advanced features
A/B Testing
Test what works:
- Go to campaign ā A/B Test
- Test variables:
- Subject lines
- Send times
- Email content
- Call-to-action buttons
- Send to 20% of list
- Winner goes to remaining 80%
Production Checklist
- [ ] API key added to environment variables
- [ ] Group ID configured
- [ ] Welcome email sequence created
- [ ] Unsubscribe link working
- [ ] Mobile-responsive templates
- [ ] Email verified with Mailerlite
- [ ] GDPR compliance checked
Common Issues
Emails Going to Spam
- Verify your domain with Mailerlite
- Avoid spam trigger words ("free", "buy now")
- Don't use all caps in subject
- Include text version (not just HTML)
Low Open Rates
- Improve subject lines
- Send at optimal times (Tue-Thu, 10am)
- Clean your list (remove inactive subscribers)
- Segment your audience
API Errors
- Verify API key is correct
- Check group ID exists
- Ensure email format is valid
- Check API rate limits
Resources
Next: Deploy to Vercel ā