PhoenixKitWeb.Controllers.EmailExportController (phoenix_kit v1.6.16)
View SourceController for exporting email tracking data to CSV format.
Provides server-side CSV export functionality for email logs, metrics, and blocklist data. Supports filtered exports based on query parameters.
Features
- Email Logs Export: Export filtered email logs to CSV
- Metrics Export: Export email analytics and performance data
- Blocklist Export: Export blocked email addresses
- Single Email Export: Export individual email details
- Filter Support: Respects all filtering parameters from LiveViews
- Large Dataset Streaming: Efficient handling of large exports
Security
Access is restricted to users with admin or owner roles in PhoenixKit. All exports require proper authentication and authorization.
Summary
Functions
Export email blocklist to CSV.
Export single email details to CSV.
Export email logs to CSV based on filter parameters.
Export email metrics data to CSV.
Functions
Export email blocklist to CSV.
Parameters
reason- Filter by block reason (rate_limit, manual, bounce, etc.)
Response
Returns CSV file with blocked email addresses and metadata.
Export single email details to CSV.
Parameters
id- Email log ID
Response
Returns CSV file with detailed email information and events.
Export email logs to CSV based on filter parameters.
Parameters
search- Search query for recipient, subject, or campaignstatus- Filter by email status (sent, delivered, bounced, etc.)message_tag- Filter by message type (authentication, marketing, etc.)campaign_id- Filter by campaign IDfrom_date- Start date filter (YYYY-MM-DD)to_date- End date filter (YYYY-MM-DD)
Response
Returns CSV file with appropriate headers for browser download.
Export email metrics data to CSV.
Parameters
period- Time period (last_7_days, last_30_days, last_90_days, etc.)group_by- Grouping option (day, week, month, campaign, provider)
Response
Returns CSV file with email metrics and analytics data.