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 873f6c8 commit 799bc1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static function getMailHost() : string{
}

public static function getMailPort() : int{
return getenv('MAIL_PORT', true) ?: getenv('MAIL_PORT') ?: 587;
return getenv('MAIL_PORT', true) ?: getenv('MAIL_PORT') ?: 465;
}

public static function getMailUsername() : string{
Expand Down
2 changes: 1 addition & 1 deletion installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ then

echo -e "\n${blue}${bold}Provide SMTP port.${blue}"
echo -e "Setting up SMTP is not required."
echo -e "Example: 587"
echo -e "Example: 465"
printf "\n${green}SMTP port: "
read MAIL_PORT
while [[ ! "$MAIL_PORT" =~ ^[0-9]{1,5}$ ]];
Expand Down
4 changes: 2 additions & 2 deletions installerGUI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ then
MAIL_HOST=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP host.\n\nSetting up SMTP is not required." 12 78 mail.passky.org 3>&1 1>&2 2>&3)
echo "MAIL_HOST=${MAIL_HOST}" >> .env

MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required." 12 78 587 3>&1 1>&2 2>&3)
MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required." 12 78 465 3>&1 1>&2 2>&3)
while [[ ! "$MAIL_PORT" =~ ^[0-9]{1,5}$ ]];
do
MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required.\n\n'${MAIL_PORT}' is not a valid port. Port must be a number between 1 and 65535." 14 78 587 3>&1 1>&2 2>&3)
MAIL_PORT=$(whiptail --title "Passky Installer - Mail Settings" --inputbox "Provide SMTP port.\n\nSetting up SMTP is not required.\n\n'${MAIL_PORT}' is not a valid port. Port must be a number between 1 and 65535." 14 78 465 3>&1 1>&2 2>&3)
done
echo "MAIL_PORT=${MAIL_PORT}" >> .env

Expand Down

0 comments on commit 799bc1f

Please sign in to comment.