miranj / craft-contact-form-tuner
为Craft CMS联系人表单插件添加了大量的额外控件(cc、bcc、回复到、模板、纯文本控制)。
1.2.0
2024-04-22 11:10 UTC
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
联系人表单调整器
此 Craft CMS 插件扩展了官方 联系表单 插件的功能,允许您
- 控制Cc接收者
- 控制Bcc接收者
- 控制回复到接收者
- 强制仅发送纯文本邮件
- 使用自定义模板作为纯文本邮件正文
- 使用自定义模板作为HTML邮件正文
内容
配置
此插件的全部设置均可从控制面板中的“设置 → 联系表单调整器”进行配置。您还可以通过在您的 config/
文件夹中创建一个 contact-form-tuner.php
文件来程序化配置此插件。此文件支持Craft的标准 多环境配置,此处定义的任何值都将覆盖通过控制面板设置的值。
以下是一个示例配置文件以及所有可能的设置及其默认值列表
<?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` ];
安装
您可以从 插件商店 或使用Composer安装此插件。
从插件商店
转到您的项目控制面板中的插件商店,搜索“Contact Form Tuner”。然后在其模态窗口中点击“安装”按钮。
使用Composer
打开您的终端并运行以下命令
# 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
要求
此插件需要Craft CMS 3、4或5以及 联系表单插件 (v2.0、v3.0或更高版本)。
由 Miranj 提供