From c95daba5206cb4bd55b5685e8141311f23606e1a Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Fri, 31 Mar 2023 05:49:40 +0300 Subject: added advances and secure confifuratin parametres --- html/app/config/app_constants.php | 39 ++++++++++++++++++++++++++++++++++----- html/app/controllers/Auth.php | 26 +++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 8 deletions(-) (limited to 'html') diff --git a/html/app/config/app_constants.php b/html/app/config/app_constants.php index a89cc6a..4ddf7ac 100644 --- a/html/app/config/app_constants.php +++ b/html/app/config/app_constants.php @@ -1,11 +1,40 @@ SMTPDebug = 2; + $mail->IsSMTP(); + $mail->Host = MAIL_HOST; + $mail->SMPTAuth = true; + $mail->SMTPSecure = MAIL_ENCRYPTION; + $mail->Protocol = 'mail'; + + $mail->Mailer = MAIL_MAILER; + $mail->Port = MAIL_PORT; + $mail->Username = MAIL_USERNAME; + $mail->Password = MAIL_PASSWORD; + + // setup format $mail->CharSet = 'utf-8'; $mail->IsHTML(true); - //It's important not to use the submitter's address as the from address as it's forgery, - //which will cause your messages to fail SPF checks. - //Use an address in your own domain as the from address, put the submitter's address in a reply-to + + // setup THE mail + // --- -- -- - - - + // It's important not to use the submitter's address as the from address as it's forgery, + // which will cause your messages to fail SPF checks. + // Use an address in your own domain as the from address, put the submitter's address in a reply-to $mail->setFrom(NO_REPLY_EMAIL, SITE_TITLE); $mail->addAddress($letter['email'], $letter['name']); $mail->addReplyTo(REPLY_TO_EMAIL, SITE_TITLE); @@ -277,3 +295,5 @@ class Auth { } +// NOTE: +// check: https://netcorecloud.com/tutorials/send-an-email-via-gmail-smtp-server-using-php/ \ No newline at end of file -- cgit v1.2.3