Newsletter System
Comprehensive newsletter management with automated emails, subscriber management, and customizable content.
Overview
CoinTrail's Newsletter System provides a complete solution for keeping your users informed about cryptocurrency news, market updates, and platform announcements. The system includes both manual newsletter campaigns and fully automated email newsletters.
The newsletter system requires properly configured email settings and cron jobs. See Email Configuration and Cron Jobs for setup instructions.
Features
Automated Newsletters
Daily and weekly newsletters sent automatically with market updates, trending coins, and curated news.
Subscriber Management
View, export, and manage your subscriber list with detailed analytics and status tracking.
User Preferences
Users can customize which types of emails they receive through their communication preferences.
News Integration
Automatically pull news from configured sources (CryptoPanic, CryptoNews-API, ChainGPT) for newsletter content.
Automated Newsletter Types
CoinTrail includes three types of automated newsletters that are sent based on user preferences:
| Newsletter Type | Schedule | Content | Cron Command |
|---|---|---|---|
| Daily Newsletter | Every day at 8:00 AM | Market overview, top gainers/losers, trending news, Fear & Greed index | newsletter:send-daily |
| Weekly Roundup | Every Sunday at 10:00 AM | Weekly market summary, top performing coins, major news highlights, upcoming events | newsletter:send-weekly |
| Portfolio Summary | Weekly (Mondays at 9:00 AM) | Personal portfolio performance, holdings breakdown, profit/loss analysis | portfolio:send-summary |
Newsletter-Specific Cron Commands
# Send daily newsletter manually
php artisan newsletter:send-daily
# Send weekly roundup manually
php artisan newsletter:send-weekly
# Send portfolio summary manually
php artisan portfolio:send-summary
# View all scheduled tasks including newsletters
php artisan schedule:list
Scheduled Newsletter Tasks
When cron is properly configured, the following newsletter tasks run automatically:
| Command | Schedule | Description |
|---|---|---|
newsletter:send-daily |
Daily at 8:00 AM | Sends daily market update to users who opted in |
newsletter:send-weekly |
Sunday at 10:00 AM | Sends weekly roundup to users who opted in |
portfolio:send-summary |
Monday at 9:00 AM | Sends portfolio summary to users with portfolios who opted in |
News API Sources
The newsletter system can pull news from multiple configured sources. Configure these in Admin > Settings > Third Party.
CryptoPanic
Real-time crypto news aggregator with sentiment analysis. Free tier available.
CryptoNews-API
Comprehensive news API with categorized crypto news. API key required.
ChainGPT RSS
AI-curated crypto news via RSS feed. No API key needed.
Configuring News Sources
- Go to Admin Panel > Settings > Third Party
- Scroll to the News API section
- Enter your API keys for the services you want to use
- Click Save
News API configuration in Third Party Settings
Managing Subscribers
View and manage all newsletter subscribers from the admin panel.
- Go to Admin Panel > Marketing > Newsletters
- View all subscribers with email, date subscribed, and status
- Filter by status (active, unsubscribed)
- Export subscribers to CSV for external use
Newsletter subscriber management
Newsletter Subscription Form
Newsletter subscription forms are automatically included in the site footer. Visitors can subscribe by entering their email address.
AJAX Subscription Endpoint
Subscriptions are handled via AJAX:
POST /ajax/newsletter-subscribe
Content-Type: application/json
{
"email": "user@example.com"
}
Response
// Success
{
"success": true,
"message": "Thank you for subscribing!"
}
// Error (already subscribed)
{
"success": false,
"message": "This email is already subscribed."
}
User Communication Preferences
Registered users can manage their email preferences to choose which newsletters they receive.
Available Preferences
| Preference | Description | Default |
|---|---|---|
| Daily Newsletter | Receive daily market updates and news | Off |
| Weekly Roundup | Receive weekly market summary | On |
| Portfolio Summary | Receive weekly portfolio performance emails | On |
| Price Alerts | Receive price alert notifications | On |
| Security Alerts | Receive login and security notifications | On |
| Promotional Emails | Receive product updates and offers | Off |
Users access preferences at: /user/communication-preferences
User email preferences management page
Enable/Disable Newsletter Feature
You can enable or disable the newsletter feature from the admin panel:
- Go to Admin Panel > Settings > Features
- Find the Enable Newsletter toggle
- Toggle ON to enable, OFF to disable
- Click Save
When disabled, the newsletter subscription form will be hidden from the site, and automated newsletters will not be sent.
Sending Manual Newsletters
In addition to automated newsletters, you can send manual email campaigns:
- Go to Admin Panel > Marketing > Compose Newsletter
- Enter a subject line
- Compose email content using the WYSIWYG editor
- Preview the email
- Select recipient list (all subscribers or filtered)
- Click Send
Ensure your email settings are properly configured before sending newsletters. See Email Configuration.
Email Templates
Newsletter email templates are located in:
resources/views/emails/
├── daily_newsletter.blade.php # Daily newsletter template
├── weekly_roundup.blade.php # Weekly roundup template
├── portfolio_summary.blade.php # Portfolio summary template
└── newsletter.blade.php # Manual newsletter template
You can customize these templates to match your branding. The templates support:
- Blade templating syntax
- Dynamic data injection (market data, news, user data)
- Responsive email design
- Unsubscribe links (automatically included)
Best Practices
- Always include an unsubscribe link - Automatically added by the system
- Send newsletters at consistent times - Users will come to expect them
- Monitor delivery rates - Check for bounces and spam complaints
- Test emails before sending - Use the preview function
- Respect user preferences - Only send newsletters to opted-in users
- Keep content valuable - Focus on useful market insights, not just promotions
Troubleshooting
- Verify cron jobs are configured:
crontab -l - Check scheduler is running:
php artisan schedule:run - Verify email configuration in
.env - Check logs:
tail -f storage/logs/laravel.log - Try sending manually:
php artisan newsletter:send-daily
- Verify news API keys are configured in Admin > Settings > Third Party
- Check that news fetching cron is running:
php artisan news:fetch - Verify there are news articles in the database
- Check API rate limits haven't been exceeded
- Set up SPF, DKIM, and DMARC records for your domain
- Use a reputable email service (SMTP, Mailgun, SendGrid)
- Avoid spam trigger words in subject lines
- Include a physical address in the email footer
- Maintain a clean subscriber list (remove bounces)