Microservice responsible for sending notification to user. Mail can send using SMTP server, as default, or AWS SES service. For use AWS SES you must set MAIL_CONNECTOR_TYPE as 'aws', it will use aws credential described below to authenticate request.
Before running you must set these properties as environment variables. AWS_SES_ACCESS_KEY_ID and AWS_SES_SECRET_ACCESS_KEY must be valued is MAIL_CONNECTOR_TYPE is 'aws'.
Property | Environment Variable | Default | Required |
---|---|---|---|
jwt.signingKey |
JWT_TOKEN_PUBLIC_KEY | yes | |
spring.mail.host |
MAIL_SERVER_HOST | yes | |
spring.mail.port | MAIL_SERVER_PORT | yes | |
spring.mail.username | MAIL_SERVER_USERNAME | yes | |
spring.mail.password | MAIL_SERVER_PASSWORD | yes | |
spring.mail.properties.mail.smtp.auth | MAIL_SERVER_SMTP_AUTH | yes | |
spring.mail.properties.mail.smtp.*.enable | MAIL_SERVER_SMTP_TLS_ENABLE | yes | |
spring.mail.protocol | MAIL_SERVER_PROTOCOL | yes |
You can run your application using:
./mvnw install
./mvnw spring-boot:run -pl app
Application will respond to the url http://localhost:8080
Application properties |
---|
Property | Environment Variable | Default | Required |
---|---|---|---|
server.port | MS_NOTIFICATION_MANAGER_SERVER_PORT | default_property | yes |
spring.application.name | n/a | default_property | yes |
spring.application.version | n/a | default_property | yes |
spring.profiles.include | n/a | default_property | yes |
spring.zipkin.enabled | n/a | default_property | yes |
spring.sleuth.baggage.remote-fields | n/a | default_property | yes |
spring.sleuth.baggage.correlation-fields | n/a | default_property | yes |
info.build.artifact | n/a | default_property | yes |
info.build.name | n/a | default_property | yes |
info.build.description | n/a | default_property | yes |
info.build.version | n/a | default_property | yes |
logging.level.it.pagopa.selfcare | MS_NOTIFICATION_MANAGER_LOG_LEVEL | default_property | yes |
logging.pattern.level | n/a | default_property | yes |
Email Connector Configurations |
---|
Property | Environment Variable | Default | Required |
---|---|---|---|
spring.mail.host | MAIL_SERVER_HOST | default_property | yes |
spring.mail.port | MAIL_SERVER_PORT | default_property | yes |
spring.mail.username | MAIL_SERVER_USERNAME | default_property | yes |
spring.mail.password | MAIL_SERVER_PASSWORD | default_property | yes |
spring.mail.properties.mail.smtp.auth | MAIL_SERVER_SMTP_AUTH | default_property | yes |
spring.mail.properties.mail.smtp.starttls.enable | MAIL_SERVER_SMTP_TLS_ENABLE | default_property | yes |
spring.mail.protocol | MAIL_SERVER_PROTOCOL | default_property | yes |
spring.mail.connector.type | MAIL_CONNECTOR_TYPE | default_property | yes |
aws.ses.secret-id | AWS_SES_ACCESS_KEY_ID | default_property | yes |
aws.ses.secret-key | AWS_SES_SECRET_ACCESS_KEY | default_property | yes |
aws.ses.region | AWS_SES_REGION | default_property | yes |
Email Core Configurations |
---|
Property | Environment Variable | Default | Required |
---|---|---|---|
notification_manager.mail.customer-care | CUSTOMER_CARE_MAIL | default_property | yes |
notification_manager.mail.no-reply | NO_REPLY_MAIL | default_property | yes |
notification_manager.mail.customer-care-subject-prefix | CUSTOMER_CARE_MAIL_SUBJECT_PREFIX | default_property | yes |
notification_manager.mail.user-subject-prefix | NOTIFICATION_TO_USER_SUBJECT_PREFIX | default_property | yes |