Fixed email configuration

This commit is contained in:
Claudio Maggioni 2020-03-09 17:06:59 +01:00
parent e3a64a6fd3
commit 0d9982fb50
2 changed files with 6 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import javax.validation.constraints.NotNull;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
/**
* Class to interface with `email.*` properties in application.properties. This properties are used
@ -12,6 +13,7 @@ import org.springframework.stereotype.Component;
* @see ch.usi.inf.sa4.sanmarinoes.smarthut.controller.UserAccountController
*/
@Component
@Validated
@EnableConfigurationProperties
@ConfigurationProperties(prefix = "email")
public class EmailConfigurationService {

View file

@ -24,10 +24,10 @@ spring.mail.properties.mail.smtp.connectiontimeout=5000
spring.mail.properties.mail.smtp.timeout=5000
spring.mail.properties.mail.smtp.writetimeout=5000
email.registrationsubject=Complete your SmartHut.sm registration
email.registrationSubject=Complete your SmartHut.sm registration
email.registration=To confirm your registration, please click here:
email.registraionpath=http://localhost:8080/register/confirm-account?token=
email.registrationPath=http://localhost:8080/register/confirm-account?token=
email.resetpasswordsubject=SmartHut.sm password reset
email.resetpasswordSubject=SmartHut.sm password reset
email.resetpassword=To reset your password, please click here:
email.resetpasswordpath=http://localhost:3000/password-reset?token=
email.resetpasswordPath=http://localhost:3000/password-reset?token=