Skip to content

44. Integracja Mailgun z GoHighLevel

Poziom: Średni | Czas: 12 min

Mailgun to dedykowany email delivery service, który może znacząco poprawić deliverability w GHL. Ideal dla high-volume senders (>10k emails/day) lub gdy standardowe GHL SMTP ma problemy.

Dlaczego Mailgun?

GHL Standard SMTP vs Mailgun:

FeatureGHL StandardMailgun
Setup✅ Zero configManual setup
CostIncluded$35/mo + usage
DeliverabilityGood (85-92%)Excellent (94-98%)
Volume limitShared IPDedicated IP option
AnalyticsBasicAdvanced
ReputationSharedYour own

When to use Mailgun:

Use Mailgun if:

  • Sending >10,000 emails/day
  • Need better deliverability
  • Want dedicated IP
  • Advanced analytics needed
  • Current deliverability <90%

Stay with GHL SMTP if:

  • Sending <5,000 emails/day
  • Good deliverability (>92%)
  • Budget-conscious
  • Don't need advanced features

Przygotowanie: Mailgun Account

Krok 1: Signup

1. mailgun.com → Sign Up
2. Plan wybierz:
   - Foundation: $35/mo (50k emails included)
   - Growth: $80/mo (100k emails)
   - Scale: Custom pricing

3. Verify email & phone

Krok 2: Add Domain

Mailgun Dashboard:
1. Sending → Domains → Add New Domain
2. Enter: mg.yourdomain.com (subdomain recommended!)
3. Click "Add Domain"

Why subdomain?

✅ mg.yourdomain.com
- Doesn't affect main domain reputation
- Easier to manage
- Industry best practice

❌ yourdomain.com
- Risk to main domain
- Harder to troubleshoot

Krok 3: DNS Records

Mailgun will pokazuje required records:

TXT Record #1 (SPF):
Type: TXT
Name: mg.yourdomain.com
Value: v=spf1 include:mailgun.org ~all

TXT Record #2 (DKIM):
Type: TXT
Name: mx._domainkey.mg.yourdomain.com
Value: k=rsa; p=[long key provided by Mailgun]

TXT Record #3 (Tracking):
Type: TXT
Name: email.mg.yourdomain.com
Value: mailgun-tracking[...]

CNAME Record (optional):
Type: CNAME
Name: email.mg.yourdomain.com
Value: mailgun.org

MX Records:
Priority: 10
Host: mg.yourdomain.com
Value: mxa.mailgun.org

Priority: 10
Value: mxb.mailgun.org

Krok 4: Verify Domain

Mailgun Dashboard → Verify DNS Settings

Wait 15-30 min for propagation.

Status should show:
✅ SPF: Valid
✅ DKIM: Valid
✅ MX: Valid
✅ Domain verified!

Integracja z GoHighLevel

Krok 1: Pobierz SMTP Credentials

Mailgun Dashboard:

Settings → API Keys → SMTP Credentials

Copy:
- SMTP Hostname: smtp.mailgun.org
- Port: 587 (TLS) or 465 (SSL)  
- Username: postmaster@mg.yourdomain.com
- Password: [generated password]

Krok 2: Configure GHL

GoHighLevel:
1. Settings → Email Services
2. Tab: "SMTP/Mailgun"
3. Click "Add SMTP Configuration"

Fill in:
- Name: "Mailgun Primary"
- SMTP Server: smtp.mailgun.org
- Port: 587
- Username: postmaster@mg.yourdomain.com
- Password: [from Mailgun]
- From Name: Your Name / Company
- From Email: hello@mg.yourdomain.com (or any@mg.yourdomain.com)

4. ☑ Enable TLS
5. Test Connection → Should show "✅ Success"
6. Save

Krok 3: Set as Default

Email Services → Default Sending Method:
● SMTP (Mailgun Primary)

All new campaigns will now use Mailgun!

Tracking Configuration

Open & Click Tracking:

Mailgun Dashboard:

Sending → Domain Settings → mg.yourdomain.com
→ Tracking Settings:

☑ Open Tracking: Yes
☑ Click Tracking: Yes  
☑ Unsubscribe Tracking: Yes (if not handled by GHL)

GHL Side:

Email campaign settings:
☑ Track opens
☑ Track clicks

Both systems will track (GHL primary, Mailgun backup)

Testing the Integration

Send Test Email:

1. GHL → Marketing → Emails → Create Campaign
2. Single email to yourself
3. Subject: "Mailgun Test"
4. Send

Check:
✅ Email received in inbox (not spam)
✅ Open tracked in GHL
✅ Click tracked in GHL
✅ Mailgun logs show delivered

Verify in Mailgun Logs:

Mailgun → Sending → Logs

Should see:
- Accepted
- Delivered
- Opened (if enabled)
- Clicked (if enabled)

Status: ✅ Delivered

Advanced: Dedicated IP

When to get dedicated IP:

Volume requirement:

  • minimum 50,000 emails/month
  • preferably 100,000+/month

Cost:

  • $90/month per IP (Mailgun)

Benefits:

✅ Dedicated reputation (not shared)
✅ Better control
✅ Higher volume capacity
✅ Whitelisting possible

❌ Requires warm-up (30 days)
❌ Higher cost

Setup Dedicated IP:

1. Mailgun → Settings → Dedicated IPs → Purchase
2. Assign IP to domain: mg.yourdomain.com
3. Update DNS (Mailgun provides records)
4. Warm-up required! (see Tutorial 42)

Warm-up schedule:
Day 1-7: 50-500/day
Day 8-14: 500-2,000/day
Day 15-21: 2,000-10,000/day
Day 22-30: 10,000-50,000+/day

Monitoring & Analytics

Mailgun Analytics Dashboard:

Sending → Analytics:

OVERVIEW:
- Delivered: 95.2% ✅
- Opens: 28.3%
- Clicks: 4.2%
- Bounces: 2.1%  
- Complaints: 0.05%

DELIVERABILITY:
- Accepted: 98.5%
- Delivered: 95.2%
- Failed: 1.5% (soft bounce)
- Permanent Failure: 1.3% (hard bounce)

TOP DOMAINS:
- gmail.com: 60% delivered, 96% accepted
- outlook.com: 25%, 94% accepted
- yahoo.com: 10%, 89% accepted (⚠️ watch this)

Logs & Troubleshooting:

Logs show each email:
- Timestamp
- Recipient
- Status (delivered/bounced/failed)
- Reason (if failed)
- Server response

Example bounce:
Status: Failed (permanent)
Reason: "550 5.1.1 User unknown"
Action: Remove email from list

Troubleshooting Common Issues

Problem: GHL not sending via Mailgun

Check:

1. SMTP settings correct?
2. Test connection: ✅ Success?
3. Default sending method = SMTP?
4. From email uses mg.yourdomain.com domain?

Problem: Emails bouncing

Mailgun Logs show reason:

550 5.7.1 = SPF fail → Fix DNS
554 5.7.1 = Spam rejected → Improve content
550 5.1.1 = Bad email address → Clean list

Problem: Low deliverability on Mailgun

Check:

1. Domain reputation: Mailgun → Domain →Reputation
2. Sending patterns: Consistent volume?
3. List quality: Clean bounces?
4. Content: Spam words removed?
5. Authentication: SPF+DKIM verified?

Mailgun vs GHL SMTP - Decision Matrix

Stay with GHL Standard SMTP if:

✅ Volume: <5,000 emails/day
✅ Deliverability: >92%
✅ Budget: Minimal ($0 extra)
✅ Setup preference: Zero configuration
✅ Needs: Basic sending

Switch to Mailgun if:

✅ Volume: >10,000 emails/day or planning to scale
✅ Deliverability: <90% or inconsistent
✅ Budget: Can afford $35+/month
✅ Needs: Advanced analytics
✅ Control: Want dedicated reputation
✅ Features: Email validation, webhooks, API

Cost Calculator

MAILGUN PRICING (2026):

Foundation: $35/month
- 50,000 emails included
- $0.50/1,000 additional emails

Example:
Month volume: 75,000 emails
Cost: $35 + (25,000 × $0.50/1k) = $35 + $12.50 = $47.50/mo

Growth: $80/month
- 100,000 emails included
- $0.40/1,000 additional

Example:
Month volume: 150,000 emails
Cost: $80 + (50,000 × $0.40/1k) = $80 + $20 = $100/mo

Compare to GHL: $0 (included), but shared reputation.

Checklist: Mailgun Setup

☑ Mailgun account created
☑ Subdomain chosen (mg.yourdomain.com)
☑ DNS records added (SPF, DKIM, MX)
☑ Domain verified in Mailgun
☑ SMTP credentials copied
☑ GHL SMTP configured
☑ Test connection successful
☑ Test email sent & received
☑ Tracking enabled (opens/clicks)
☑ Logs monitored (first few campaigns)
☑ Deliverability checked (>95% target)

Następny krok: 45. Best practices email marketing - podsumowanie i długoterminowa strategia