diff --git a/composer.json b/composer.json index 12f8f70..7f039a7 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ "catfan/medoo": "^1.5", "guzzlehttp/guzzle": "^6.2", "geoip2/geoip2": "~2.0", - "unsplash/unsplash": "^2.4" + "unsplash/unsplash": "^2.4", + "phpmailer/phpmailer": "^6.0" }, "license": "MPL-2.0", "authors": [ diff --git a/composer.lock b/composer.lock index c30be00..38f544f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "14eefa1d98fa62ca2f2fe52de606868c", - "content-hash": "e9f318b9d8bd1dfa6c7fb56c820d1910", + "hash": "f30e715ebe71e016a347feec9c9dc5bf", + "content-hash": "9efd5e7ff4f253d9ef07ae1535880ffb", "packages": [ { "name": "catfan/medoo", @@ -624,6 +624,72 @@ ], "time": "2018-04-04 21:24:14" }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.5", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "cb3ea134d4d3729e7857737d5f320cce9caf4d32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/cb3ea134d4d3729e7857737d5f320cce9caf4d32", + "reference": "cb3ea134d4d3729e7857737d5f320cce9caf4d32", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "time": "2018-03-27 13:49:45" + }, { "name": "psr/http-message", "version": "1.0.1", diff --git a/lang/en_us.php b/lang/en_us.php index 99b75d8..a87fa4d 100644 --- a/lang/en_us.php +++ b/lang/en_us.php @@ -141,4 +141,6 @@ define("STRINGS", [ "new" => "New", "search" => "Search", "no results" => "No results.", + "contact form" => "Contact Form", + "contact form messages will be forwarded to this email address" => "Contact form messages will be forwarded to this email address, if it is set.", ]); diff --git a/pages/sitesettings.php b/pages/sitesettings.php index 49a0180..5f8fecb 100644 --- a/pages/sitesettings.php +++ b/pages/sitesettings.php @@ -245,6 +245,20 @@ function getsetting($name) { + +
From: ' . htmlspecialchars($_POST['name']) . ' <' . $_POST['email'] . '>
' + . 'Message:
' . htmlspecialchars($_POST['message']) . '