Download the PHP package jflepp/picomailformsplugin without Composer
On this page you can find all versions of the php package jflepp/picomailformsplugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jflepp/picomailformsplugin
More information about jflepp/picomailformsplugin
Files in jflepp/picomailformsplugin
Package picomailformsplugin
Short Description A mail plugin with forms for pico
License unlicense
Informations about the package picomailformsplugin
PicoMailFormsPlugin
PicoMailForms is a plugin for Pico which allows you to define a form and send a mails to a configured smtp server on submitting.
Forms can be written entirely in Markdown using custom markdown extensions. The mail is then being sent using PHPMailer.
PicoMailForms has been developed keeping CleanCode in mind. Unfortunately I'm not very familiar with PHP and the UnitTest coverage is therefore low. The IntegrationTest coverage reaches 98%.
Pull requests are welcome!
Use cases
- Registration forms
- Contact forms
- and more...
Features
- Markdown extension for forms
- Mail success / error page after form submit
- Operator mail
- Custom success / error message
- Bootstrap forms
- Error Mail to administrator
- 98% test coverage
Installation
Install the plugin using composer: composer require jflepp/picomailformsplugin
.
Small Example
Configuration
Mail:
SenderName: test.ch
Host: server.test.ch
UserName: [email protected]
Password: test
Port: 587
OperatorMail: [email protected]
Form
[form]
[text mail]E-Mail[/text]
[text]some other information[/text]
[/form]
Operator Mail
A user has successfully filled your form: test
[email protected] | |
first_name | Hans |
last_name | Zimmer |
some_other_information | This is me |
Full configuration
Configuring PicoMailFormsPlugin is straight forward.
Mail:
SenderName: MyWebsite
Host: smpt.myprovider.com
UserName: [email protected]
Password: apassword
Port: 587
OperatorMail: [email protected]
Forms:
UseBootstrap: true
Full form
[form]
[subject]Registration for event XY[/subject]
[success]You successfully registered for the event XY! You're going to receive more information asap[/success]
[failed]Registration failed. The site administrator has already been informed.[/failed]
[text mail required]Mail[/text]
[text firstname]First name[/text]
[text lastname]Last name[/text]
[text]Address[/text]
[text]Other informations[/text]
[textarea required]Message[/textarea]
[/form]
[form]
The beginning / end of a form. All data inbetween will be either interpreted or lost[success]
Defines the success message shown on the webpage and in the mail[failed]
The fail message shown on the page when a mail failed[text]
Will be transformed to a text input, the text inbetween will be used as label[text required]
Adds required to the input[text mail]
A usual text input which signalizes PicoMailForms that this is where the user mail is being specified. You can use any label you want. This is the only field required in a form.[text firstname][text lastname]
The first name and last name of the user. It will be set as receivername of the usermail.[textarea]
Defines textareas