aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-06-29 13:56:27 -0400
committerThedro Neely <thedroneely@gmail.com>2019-06-29 13:56:27 -0400
commit0268f14255191dfb1a4b65169c83bc15a621935d (patch)
treeaf9a2dd7ed76bd79e2135e28577d36af2b59f824 /bootstrap
parentfb01dde943933b6040ce5688999ef945b1e84d4b (diff)
downloadedwinmattiacci.com-0268f14255191dfb1a4b65169c83bc15a621935d.tar.gz
edwinmattiacci.com-0268f14255191dfb1a4b65169c83bc15a621935d.tar.bz2
edwinmattiacci.com-0268f14255191dfb1a4b65169c83bc15a621935d.zip
bootstrap/Functions: Remove reply to since it causes Yahoo not to send mail
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/Functions.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/bootstrap/Functions.php b/bootstrap/Functions.php
index cba90aa..9bd0e82 100644
--- a/bootstrap/Functions.php
+++ b/bootstrap/Functions.php
@@ -7,32 +7,32 @@ use PHPMailer\PHPMailer\Exception;
function sendMail($name, $email, $message)
{
// Require mail config
- $config = require '../AppConfig.php';
+ $config = include '../AppConfig.php';
$mail = new PHPMailer(true);
try {
//Server settings
- //$mail->SMTPDebug = 2; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = $config['mail']['host']; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = $config['mail']['username']; // SMTP username
- $mail->Password = $config['mail']['password']; // SMTP password
- $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = $config['mail']['port']; // TCP port to connect to
+ //$mail->SMTPDebug = 2;
+ $mail->isSMTP();
+ $mail->SMTPAuth = true;
+ $mail->SMTPSecure = 'ssl';
+ $mail->Port = $config['mail']['port'];
+ $mail->Host = $config['mail']['host'];
+ $mail->Username = $config['mail']['username'];
+ $mail->Password = $config['mail']['password'];
//Recipients
$mail->setFrom($config['mail']['username'], 'Edwin Mattiacci');
$mail->addAddress($config['mail']['username'], 'Edwin Mattiacci');
- $mail->addReplyTo($email, $name);
//Content
$mail->isHTML(true);
- $mail->Subject = 'New message from ' . $name;
- $mail->Body = $message;
- $mail->AltBody = $message;
+ $mail->Subject = 'New message from ' . $email;
+ $mail->Body = $message . "\n\n" . $name . "\n" . $email;
+ $mail->AltBody = $message . "\n\n" . $name . "\n" . $email;
$mail->send();
+
} catch (Exception $exception) {
log_exception($exception);
}