Explorar el Código

modified navigation responsive issue

tags/v1.0.0
somrat hace 6 años
padre
commit
00e2393b2d

+ 77
- 0
static/php/mailer.php Ver fichero

@@ -0,0 +1,77 @@
<?php

// you need to replace your SMTP login details here
// this script is working for sending mail but not making a proper js call back yet

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'phpmailer/Exception.php';
require 'phpmailer/PHPMailer.php';
require 'phpmailer/SMTP.php';

//$mail->SMTPDebug = 2;

// this should catch a lot of spam bots
$honeypot = trim($_POST["email"]);

if(!empty($honeypot)) {
echo "BAD ROBOT!";
exit;
}

$msg = '';
//Don't run this unless we're handling a form submission
if (array_key_exists('email', $_POST)) {
date_default_timezone_set('Etc/UTC');
$mail = new PHPMailer;
//Tell PHPMailer to use SMTP - requires a local mail server
//Faster and safer than using mail()
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.server.net'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'mailer@server.net'; // SMTP username
$mail->Password = 'mailerPASSWord'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 25; // TCP port to connect to
//Use a fixed address in your own domain as the from address
//**DO NOT** use the submitter's address here as it will be forgery
//and will cause your messages to fail SPF checks
$mail->setFrom('sender@server.net', 'Your Name');
//Send the message to yourself, or whoever should receive contact for submissions

$mail->addAddress('testsendmail@greenant.net', 'Your Name');
//Put the submitter's address in a reply-to header
//This will fail if the address provided is invalid,
//in which case we should ignore the whole request
if ($mail->addReplyTo($_POST['email_real'], $_POST['name'])) {
$mail->Subject = 'PHPMailer contact form';
//Keep it simple - don't use HTML
$mail->isHTML(false);
//Build a simple message body
$mail->Body = <<<EOT
Email: {$_POST['email_real']}
Name: {$_POST['name']}
Message: {$_POST['message']}
EOT;
//Send the message, check for errors
if (!$mail->send()) {
//The reason for failing to send will be in $mail->ErrorInfo
//but you shouldn't display errors to users - process the error, log it on your server.
$msg = 'Sorry, something went wrong. Please try again later.';
} else {
$msg = 'sent';
}
} else {
$msg = 'Invalid email address, message ignored.';
}

echo $msg;
return $msg;
//exit;
}




?>

+ 40
- 0
static/php/phpmailer/Exception.php Ver fichero

@@ -0,0 +1,40 @@
<?php
/**
* PHPMailer Exception class.
* PHP Version 5.5.
*
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
*
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/

namespace PHPMailer\PHPMailer;

/**
* PHPMailer exception handler.
*
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
*/
class Exception extends \Exception
{
/**
* Prettify error message output.
*
* @return string
*/
public function errorMessage()
{
return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
}
}


+ 4406
- 0
static/php/phpmailer/PHPMailer.php
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1326
- 0
static/php/phpmailer/SMTP.php
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


Cargando…
Cancelar
Guardar