miranj / craft-contact-form-tuner
Adds a bunch of additional controls (cc, bcc, reply-to, templates, plain text control) to the Craft CMS Contact Form plugin.
Installs: 31 415
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 0
Type:craft-plugin
Requires
- php: ^7.2.5 || ^8.0
- craftcms/cms: ^3.0 || ^4.0 || ^5.0
- craftcms/contact-form: ^2.0 || ^3.0
Requires (Dev)
- craftcms/phpstan: dev-main
- craftcms/rector: dev-main
README
Contact Form Tuner
This Craft CMS plugin extends functionality offered by the official Contact Form plugin by allowing you to:
- Control Cc recipients
- Control Bcc recipients
- Control Reply-To recipients
- Force plain text only emails
- Use a custom template for the plain text email body
- Use a custom template for the HTML email body
Contents
Configuration
All settings for this plugin can be configured from the Control Panel under Settings → Contact Form Tuner. You can also configure the plugin programmatically by creating a contact-form-tuner.php
file in your config/
folder. This file supports Craft's standard multi-environment configurations, and any values defined here will override those set via the Control Panel.
Here is a sample config file along with a list of all possible settings and their default values:
<?php return [ 'ccEmail' => '', // e.g. 'ccme@example.com' or ['one@example.com', 'two@example.com'] 'ccName' => '', 'bccEmail' => '', 'hideReplyTo' => false, 'replyToEmail' => '', // leaving this empty preserves the reply-to set by Contact Form 'replyToName' => '', 'textOnly' => false, // enabling this forces the email to be sent in plain text only 'textTemplate' => '', // templates have access to submitted values 'htmlTemplate' => '', // such as `fromName`, `fromEmail`, `subject` and `message` ];
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “Contact Form Tuner”. Then click on the “Install” button in its modal window.
Using Composer
Open your terminal and run the following commands:
# go to the project directory
cd /path/to/project
# tell composer to use the plugin
composer require miranj/craft-contact-form-tuner
# tell Craft to install the plugin
./craft plugin/install contact-form-tuner
Requirements
This plugin requires Craft CMS 3, 4, or 5 and the Contact Form plugin (v2.0, v3.0 or later).
Brought to you by Miranj