-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Sender email is not loaded from configuration
- Loading branch information
Showing
2 changed files
with
4 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -34,6 +34,7 @@ internal class UserService : IUserService | |
private readonly string _jwtTokenKey; | ||
private readonly string _mailJetApiKey; | ||
private readonly string _mailjetApiSecret; | ||
private readonly string _mailjetSenderEmail; | ||
private string _functionBaseUrl; | ||
|
||
// TODO This is a hack. We should have something like a "FilesystemService" | ||
|
@@ -47,6 +48,7 @@ public UserService(IUserStore userStore, IConfigurationService configurationServ | |
_mailJetApiKey = configurationService.GetValue(ConfigurationServiceWellKnownKeys.MailjetApiKey); | ||
_mailjetApiSecret = configurationService.GetValue(ConfigurationServiceWellKnownKeys.MailjetApiSecret); | ||
_functionBaseUrl = configurationService.GetValue(ConfigurationServiceWellKnownKeys.BaseFunctionUrl); | ||
_mailjetSenderEmail = configurationService.GetValue(ConfigurationServiceWellKnownKeys.MailjetSenderEmail); | ||
} | ||
|
||
public async Task<User> Register(string lastName, string firstName, string birthYear, string email, | ||
|
@@ -203,7 +205,7 @@ private async Task SendEmail(string to, string content, string textContent, stri | |
{ | ||
"From", | ||
new JObject { | ||
{"Email", "[email protected]"}, | ||
{"Email", _mailjetSenderEmail}, | ||
{"Name", "Surfrider"} | ||
} | ||
}, { | ||
|