Download the PHP package misterbk/optinmail without Composer
On this page you can find all versions of the php package misterbk/optinmail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download misterbk/optinmail
More information about misterbk/optinmail
Files in misterbk/optinmail
Package optinmail
Short Description A plugin that simplifies the implementation of opt-in process for any input forms in Craft CMS.
License proprietary
Informations about the package optinmail
optinmail
A plugin that simplifies the implementation of opt-in process for any input forms.
This is a Plugin for developers, as you will need to provide your own template-files.
Prerequisites
This plugin requires Craft CMS 4.0.0 or later
Installing
go to the project directory
tell Composer to load the plugin
tell Craft to install the plugin
Setup
To get this plugin to work, you need to create or link your own template files.
1. Settings
To do this, please open the Controll-Center setup page in the admin section of Craft:\ "Settings > Plug-ins > Opt In Mail"\ Set the path to all three template files. An example is provided in the examples-folder of this plugin. You can see how to access the variables provided in these views and see example implementations of the emails/sites
2. Qualified Field Names
To prevent database-injection you have to provide "qualified field names", which means, that you whitelist the fields you want to accept in the form you want to connect with an opt-in-procedure. Just add the names of your input fields under the corresponding formHandle in the "opt-in-mail.php file". You find this file under: "config/opt-in-mail.php"\ If that file does not exist, you can copy our example config file from "craft-plugin-optInMail/src/examples/opt-in-mail.php" to Craft's config folder and add your field names there.
3. Hook up your form
When everything is set up you can connect your form to the plugin by adding a hidden input field to your form with the following format:\
whereas {{handle}} is the formHandle you provided in the "opt-in-mail.php" config file in step 2
4. Test your form
If Craft's mailing settings are set you can submit your form and see if you receive the opt-in-mail.
Additional Info
This is one of our first Plug-ins for Craft 3, so we rely on your feedback. If you have any suggestions or found any bugs, please contact us over our Github-Account : https://github.com/mister-bk or via email: mister-bk!