Commit 70fdb9061888471fbea2c52df51a690040cf135e

Authored by Igor Kulikov
1 parent 2b868646

Remove api usage state for system sendEmail method

@@ -160,10 +160,8 @@ public class DefaultMailService implements MailService { @@ -160,10 +160,8 @@ public class DefaultMailService implements MailService {
160 160
161 @Override 161 @Override
162 public void sendEmail(TenantId tenantId, String email, String subject, String message) throws ThingsboardException { 162 public void sendEmail(TenantId tenantId, String email, String subject, String message) throws ThingsboardException {
163 - if (apiUsageStateService.getApiUsageState(tenantId).isEmailSendEnabled()) {  
164 - sendMail(mailSender, mailFrom, email, subject, message);  
165 - apiUsageClient.report(tenantId, ApiUsageRecordKey.EMAIL_EXEC_COUNT, 1);  
166 - } 163 + sendMail(mailSender, mailFrom, email, subject, message);
  164 + apiUsageClient.report(tenantId, ApiUsageRecordKey.EMAIL_EXEC_COUNT, 1);
167 } 165 }
168 166
169 @Override 167 @Override