What problem does it solve?
This Skill simplifies the complex process of generating and configuring email functionality in CFWheels applications. It ensures proper email structure, responsive layouts, and robust testing for all your transactional and notification emails, saving you time and ensuring reliable delivery.
Core Features & Use Cases
- Mailer Controller & Templates: Generates mailer controllers and both HTML and plain text email templates with responsive design best practices.
- Flexible Configuration: Provides configuration examples for various SMTP providers (Gmail, SendGrid, Mailgun, AWS SES) and environment-specific settings.
- Advanced Email Patterns: Includes guidance for file attachments, multiple recipients, and an email queue pattern for background processing.
- Use Case: Implement a password reset email. This skill provides the mailer controller action, the HTML and plain text templates, and the configuration to send it via your chosen SMTP provider, ensuring a professional and functional email system.
Quick Start
In controllers/Mailer.cfc:
component extends="Controller" {
function welcome(required user) {
sendEmail(
to = arguments.user.email,
subject = "Welcome!",
template = "mailer/welcome"
);
}
}