Update for 5.7.x changes

This commit is contained in:
Tadgh
2022-01-26 18:45:45 -08:00
parent 0f133274a1
commit bbd9428d6e
5 changed files with 17 additions and 6 deletions

View File

@@ -10,7 +10,9 @@ import ca.uhn.fhir.jpa.model.entity.ModelConfig;
import ca.uhn.fhir.jpa.subscription.channel.subscription.SubscriptionDeliveryHandlerFactory;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailSenderImpl;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.IEmailSender;
import ca.uhn.fhir.rest.server.mail.IMailSvc;
import ca.uhn.fhir.rest.server.mail.MailConfig;
import ca.uhn.fhir.rest.server.mail.MailSvc;
import com.google.common.base.Strings;
import org.hl7.fhir.dstu2.model.Subscription;
import org.springframework.boot.env.YamlPropertySourceLoader;
@@ -217,9 +219,9 @@ public class FhirServerConfigCommon {
mailConfig.setSmtpPassword(email.getPassword());
mailConfig.setSmtpUseStartTLS(email.getStartTlsEnable());
IEmailSender emailSender = new EmailSenderImpl(mailConfig);
IMailSvc mailSvc = new MailSvc(mailConfig);
IEmailSender emailSender = new EmailSenderImpl(mailSvc);
if(subscriptionDeliveryHandlerFactory.isPresent())
subscriptionDeliveryHandlerFactory.get().setEmailSender(emailSender);
return emailSender;