-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #994 from AppFlowy-IO/fix/smtp-email-username
feat: separate smtp username from email
- Loading branch information
Showing
9 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,7 @@ APPFLOWY_S3_BUCKET=appflowy | |
# Note that smtps (TLS) is always required, even for ports other than 465 | ||
APPFLOWY_MAILER_SMTP_HOST=smtp.gmail.com | ||
APPFLOWY_MAILER_SMTP_USERNAME=[email protected] | ||
APPFLOWY_MAILER_SMTP_EMAIL=[email protected] | ||
APPFLOWY_MAILER_SMTP_PASSWORD=email_sender_password | ||
|
||
RUST_LOG=info | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,12 @@ impl Config { | |
mailer: MailerSetting { | ||
smtp_host: get_env_var("APPFLOWY_MAILER_SMTP_HOST", "smtp.gmail.com"), | ||
smtp_port: get_env_var("APPFLOWY_MAILER_SMTP_PORT", "465").parse()?, | ||
smtp_email: get_env_var("APPFLOWY_MAILER_SMTP_EMAIL", "[email protected]"), | ||
// `smtp_username` could be the same as `smtp_email`, but may not have to be. | ||
// For example: | ||
// - Azure Communication services uses a string of the format <resource name>.<app id>.<tenant id> | ||
// - SendGrid uses the string apikey | ||
// Adapted from: https://github.com/AppFlowy-IO/AppFlowy-Cloud/issues/984 | ||
smtp_username: get_env_var("APPFLOWY_MAILER_SMTP_USERNAME", "[email protected]"), | ||
smtp_password: get_env_var("APPFLOWY_MAILER_SMTP_PASSWORD", "password").into(), | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -261,6 +261,7 @@ pub fn get_configuration() -> Result<Config, anyhow::Error> { | |
smtp_host: get_env_var("APPFLOWY_MAILER_SMTP_HOST", "smtp.gmail.com"), | ||
smtp_port: get_env_var("APPFLOWY_MAILER_SMTP_PORT", "465").parse()?, | ||
smtp_username: get_env_var("APPFLOWY_MAILER_SMTP_USERNAME", "[email protected]"), | ||
smtp_email: get_env_var("APPFLOWY_MAILER_SMTP_EMAIL", "[email protected]"), | ||
smtp_password: get_env_var("APPFLOWY_MAILER_SMTP_PASSWORD", "password").into(), | ||
}, | ||
apple_oauth: AppleOAuthSetting { | ||
|