use of org.hisp.dhis.outboundmessage.OutboundMessageResponse in project dhis2-core by dhis2.
the class SmsMessageSender method sendMessage.
private OutboundMessageResponse sendMessage(String subject, String text, Set<String> recipients, SmsGatewayConfig gatewayConfig) {
for (SmsGateway smsGateway : smsGateways) {
if (smsGateway.accept(gatewayConfig)) {
log.info("Sending SMS to " + recipients);
OutboundMessageResponse status = smsGateway.send(subject, text, recipients, gatewayConfig);
return handleResponse(status);
}
}
return new OutboundMessageResponse(NO_CONFIG, GatewayResponse.NO_GATEWAY_CONFIGURATION, false);
}
Aggregations