Skip to content

Commit

Permalink
Made SMTPS / TLS / SSL as default in configuration for Email encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
zigazajc007 committed Dec 13, 2022
1 parent cd1d954 commit 873f6c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ BACKUP_LOCATION=
# Provide SMTP credentials
MAIL_ENABLED=false
MAIL_HOST=
MAIL_PORT=
MAIL_PORT=465
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_USE_TLS=
MAIL_USE_TLS=true

#
# ACCOUNT SETTINGS
Expand Down
2 changes: 1 addition & 1 deletion api/src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ public static function forgotUsername(string $email) : string{
$mail->SMTPAuth = true;
$mail->Username = Settings::getMailUsername();
$mail->Password = Settings::getMailPassword();
$mail->SMTPSecure = (Settings::getMailTLS()) ? PHPMailer::ENCRYPTION_STARTTLS : PHPMailer::ENCRYPTION_SMTPS;
$mail->SMTPSecure = (Settings::getMailTLS()) ? PHPMailer::ENCRYPTION_SMTPS : PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = Settings::getMailPort();

$mail->setFrom(Settings::getMailUsername(), 'Passky');
Expand Down
4 changes: 2 additions & 2 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ then
echo "MAIL_PASSWORD=${MAIL_PASSWORD}" >> .env
else
echo "MAIL_HOST=" >> .env
echo "MAIL_PORT=" >> .env
echo "MAIL_PORT=465" >> .env
echo "MAIL_USERNAME=" >> .env
echo "MAIL_PASSWORD=" >> .env
echo "MAIL_USE_TLS=" >> .env
echo "MAIL_USE_TLS=true" >> .env
fi

echo -e "\n\n${gray}----------------------------------------------------------------------------------------------------------------------------------${none}"
Expand Down
4 changes: 2 additions & 2 deletions installerGUI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ then
else
echo "MAIL_ENABLED=false" >> .env
echo "MAIL_HOST=" >> .env
echo "MAIL_PORT=" >> .env
echo "MAIL_PORT=465" >> .env
echo "MAIL_USERNAME=" >> .env
echo "MAIL_PASSWORD=" >> .env
echo "MAIL_USE_TLS=" >> .env
echo "MAIL_USE_TLS=true" >> .env
fi

if (whiptail --title "Passky Installer - Mail Settings" --yesno "Do you want backups to be enabled?\n\nBackup perform every day and will export database to external server thru SSH (Using SCP).\n\nIf you don't have any external server ready for backups, leave it disabled." 14 78);
Expand Down

0 comments on commit 873f6c8

Please sign in to comment.