Skip to content

Commit 3581f7b

Browse files
committed
litle fix in mailer class
1 parent 8c42d57 commit 3581f7b

4 files changed

Lines changed: 42 additions & 29 deletions

File tree

api/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
pass.php

api/php/.idea/workspace.xml

Lines changed: 34 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/php/classes/mailer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55

66
class Mailer {
77
public function sendMail($clientMail, $phone, $message) {
8+
include '../config/pass.php';
9+
810
$mail = new PHPMailer(true);
911
$mail->isSMTP();
1012
$mail->SMTPDebug = 2;
1113
$mail->Debugoutput = 'html';
12-
$mail->Host = 'ncg.home.pl';
14+
$mail->Host = 'ncg.zenbox.pl';
1315
$mail->Port = 587;
1416
$mail->SMTPSecure = 'tls';
1517
$mail->CharSet = 'UTF-8';
1618
$mail->SMTPAuth = true;
19+
$mail->Username = 'kontakt@tymdev.pl';
20+
$mail->Password = $emailPassword;
1721
$mail->Subject = 'Nowa wiadomość ze strony tymdev.pl!';
1822
$mail->msgHTML(
1923
'email klienta: ' . $clientMail . '<br>' .

api/php/routes/sendMail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
isset($_POST['message']) && !empty($_POST['message'])
1717
) {
1818
include_once('../classes/mailer.php');
19-
19+
2020
if(!isset($_POST['phone']) || empty($_POST['phone'])) {
2121
$phone = 'Nie podano.';
2222
} else {

0 commit comments

Comments
 (0)