📧 Email-to-Blog Complete Guide

Create beautiful blog posts by simply sending an email. Comprehensive documentation for the Email-to-Blog automation system.

📋 Overview

The Email-to-Blog system allows you to create beautiful blog posts by simply sending an email to blogs@morsetrainerpro.com. The system automatically processes your email every 30 minutes and publishes it according to your specifications.

🚀 Quick Start

Basic Email Format

Subject: Your Amazing Blog Post Title

Body:

STATUS: published CATEGORY: Morse Code Training KEYWORDS: morse code, training, tutorial EXCERPT: A brief summary of your blog post (optional) Your blog post content goes here. You can write multiple paragraphs. Each paragraph separated by a blank line will be formatted as a proper HTML paragraph. # Main Heading Use # symbols for headings. ## Sub Heading Add as many sections as you need. **Bold text** works too. *Italic text* is supported. Your content will be beautifully formatted automatically!

Attachments: Add 1 or more images (JPG, PNG, GIF, WEBP) - the first image becomes the featured image.

📝 Email Format Specification

Subject Line

The email subject becomes your blog post title:

Subject: 10 Tips for Learning Morse Code Faster

You can also use pipes to separate title from additional info:

Subject: 10 Tips for Learning Morse Code Faster | Beginner's Guide

(Everything before the first | becomes the title)

Metadata Fields (Optional)

Add these fields at the beginning of your email body. Each field is optional:

Alternative Metadata Format

You can also wrap metadata in markers:

[METADATA] STATUS: published CATEGORY: Tutorials KEYWORDS: beginner, tips, morse code EXCERPT: Your excerpt here [/METADATA] Your blog post content starts here...

Or:

---METADATA--- STATUS: published CATEGORY: Tutorials ---END METADATA--- Your content...

📷 Image Attachments

Featured Image

Supported Formats

File Naming

Images are automatically renamed with timestamps to prevent conflicts:

2025-01-14-153045-abc123.jpg

All images are saved to: /uploads/blog-images/

🎨 Content Formatting

Headings

Use hashtags for headings (Markdown-style):

# Main Heading (H1) ## Subheading (H2) ### Smaller Heading (H3)

Or use ALL CAPS on a single line (auto-converted to H2):

THIS BECOMES A HEADING

Paragraphs

Separate paragraphs with blank lines:

This is paragraph one. This is paragraph two. This is paragraph three.

Line Breaks

Single line breaks within a paragraph are preserved:

First line Second line Third line

Lists

Use standard formatting:

- Item one - Item two - Item three 1. First 2. Second 3. Third

📧 Complete Email Examples

Example 1: Simple Published Post

To: blogs@morsetrainerpro.com
Subject: Getting Started with CW
Attachments: cw-diagram.jpg

Body:

STATUS: published CATEGORY: Beginners Guide KEYWORDS: morse code, cw, getting started, tutorial # Welcome to Morse Code! Morse code, also known as CW (Continuous Wave), is a method of transmitting text information as a series of on-off tones, lights, or clicks. ## Why Learn Morse Code? Here are some great reasons: - It's fun and challenging - Improves concentration - Works when other communications fail - Rich amateur radio tradition ## Getting Started Start with the Koch method. Learn two characters at a time, starting with K and M. Practice daily for just 10-15 minutes. Happy learning!

Example 2: Scheduled Post

To: blogs@morsetrainerpro.com
Subject: Advanced CW Contest Techniques
Attachments: contest-setup.jpg

Body:

[METADATA] STATUS: scheduled SCHEDULE: 2025-01-20 08:00:00 CATEGORY: Contest Tips KEYWORDS: cw contest, competition, advanced techniques EXCERPT: Master these advanced techniques to improve your contest scores [/METADATA] # Advanced CW Contest Techniques Taking your contest operating to the next level requires mastering several key techniques. ## Equipment Setup Your station setup can make or break your contest performance...

Example 3: Draft for Review

To: blogs@morsetrainerpro.com
Subject: Upcoming Morse Code Events 2025

Body:

STATUS: draft CATEGORY: Events KEYWORDS: events, calendar, 2025, morse code # 2025 Morse Code Events Calendar Here's what's coming up in the world of CW... (This will be saved as a draft for review before publishing)

⚙️ Configuration Setup

Environment Variables (.env file)

Add these to your .env file:

# Email-to-Blog Configuration BLOG_EMAIL_ADDRESS=blogs@morsetrainerpro.com BLOG_EMAIL_PASSWORD=your-app-password-here BLOG_EMAIL_MAILBOX={imap.gmail.com:993/imap/ssl}INBOX # For Gmail: # 1. Enable IMAP in Gmail settings # 2. Create an App Password (if 2FA enabled) # 3. Use format: {imap.gmail.com:993/imap/ssl}INBOX # For other providers: # - Office 365: {outlook.office365.com:993/imap/ssl}INBOX # - Yahoo: {imap.mail.yahoo.com:993/imap/ssl}INBOX # - Custom: {mail.yourdomain.com:993/imap/ssl}INBOX

Gmail Setup (Recommended)

  1. Go to Gmail Settings and enable IMAP under "Forwarding and POP/IMAP"
  2. Go to Google Account Security
  3. Enable 2-Factor Authentication
  4. Create an App Password:
    • Select "Mail" and your device
    • Copy the generated password
    • Use this password in .env file

❓ Troubleshooting

"Cannot connect to mailbox" Error

Solution:

  1. Verify IMAP is enabled in email settings
  2. Check firewall allows port 993
  3. Verify credentials in .env
  4. For Gmail, use App Password (not regular password)

"No blogger or admin user found" Error

Solution:

Make sure at least one user has blogger permissions:

UPDATE users SET is_blogger = 1 WHERE username = 'your-username';

Images Not Uploading

Solution:

  1. Check directory permissions: chmod 755 /path/to/uploads/blog-images
  2. Verify uploads directory exists
  3. Check disk space

PHP IMAP Extension Missing

Solution:

Install the IMAP extension:

# Ubuntu/Debian sudo apt-get install php-imap sudo systemctl restart apache2 # CentOS/RHEL sudo yum install php-imap sudo systemctl restart httpd

🎯 Best Practices

Email Writing Tips

  1. Write clear subject lines - They become your titles
  2. Use metadata - Makes posts more discoverable
  3. Attach quality images - They enhance visual appeal
  4. Proofread before sending - No editing after email sent
  5. Use STATUS: draft - Review before publishing

Content Tips

  1. Break content into sections - Use headings
  2. Keep paragraphs short - Easier to read
  3. Add keywords - Helps with SEO
  4. Write compelling excerpts - Encourages clicks
  5. Schedule during peak times - Maximize engagement

Workflow Tips

  1. Draft in email app - Use rich text editor
  2. Save email templates - For consistent formatting
  3. Check logs regularly - Catch issues early
  4. Monitor blog analytics - See what works
  5. Back up regularly - Protect your content

📞 Support

For issues or questions:

🎉 Happy Blogging!

You're all set! Start sending emails and watch your blog grow automatically.

Remember: The system checks for new emails every 30 minutes, so your posts will appear within that timeframe.

Last Updated: January 2025
Morse Trainer Pro - Email-to-Blog System v1.0

← Back to Blog Admin