From 0d6a515ae209b5ab552e7cf6a83094b85ac94af5 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Sun, 2 Jun 2019 06:22:33 -0400 Subject: app/model/Form: Do not use reply to Some mail servers are finicky --- app/model/Form.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'app/model') diff --git a/app/model/Form.php b/app/model/Form.php index f3d7a15..61efb2f 100644 --- a/app/model/Form.php +++ b/app/model/Form.php @@ -41,24 +41,24 @@ class Form try { //Server settings - $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'], 'Thedro Neely'); $mail->addAddress($config['mail']['username'], 'Thedro Neely'); - $mail->addReplyTo($this->email, $this->name); //Content $mail->isHTML(true); - $mail->Subject = 'New message from ' . $this->name; - $mail->Body = $this->message; - $mail->AltBody = $this->message; + $mail->Subject = 'New message from ' . $this->email; + $mail->Body = $this->message . "\n\n" . $this->name . "\n" . $this->email; + $mail->AltBody = $this->message . "\n\n" . $this->name . "\n" . $this->email; //Send Mail $mail->send(); -- cgit v1.2.3