MameForm is a simple contact form based on Sliex, Twig, SwiftMailer4
Silex is based on Symfony2.
Silex works with PHP 5.3.2 or later. And if your PHP is compiled with --enable-zend-multibyte, phar doesn't work well. MameForm app include .htacees to deny users to access view and vendor files, so .htaccess is available on the server.
get code from GitHub.
git clone git://github.com/brtriver/MameForm.git ./MameForm
cd ./MameForm
git submodule init
git submodule update
If you need, you have to change .htaccess file.
You have to change the define in index.php.
// set your mailer config.
$app['mailer.subject'] = "Email from MameForm";
$app['mailer.address_from'] = "[email protected]";
If you can change the mail body, you have only to modify the mail.twig.
You can use parameters below.
{{ request.get('parameter_name') }} : get escaped request parameter
{{ app.baseUrl }} : get base URL
In this application, Logic is only written in index.php simply. If you want to customize this, modify the index.php. This is not the best way to build an application but reading sample code is the easiest way to lean Silex.
MameForm is licensed under the MIT license.