[WEB-4479] feat: enable/disable SMTP configuration (#7393)

* feat: api update instance configuration

* chore: add enable_smtp key

* fix: empty string for enable_smtp key

* chore: update email_port and email_from

* fix: handled smtp enable disable

* fix: error handling

* fix: refactor

* fix: removed enabled toast

* fix: refactor

---------

Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
Co-authored-by: Akshita Goyal <36129505+gakshita@users.noreply.github.com>
This commit is contained in:
Sangeetha 2025-07-16 01:04:18 +05:30 committed by GitHub
parent da5390fa03
commit 99127ff8e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 155 additions and 24 deletions

View file

@ -122,4 +122,17 @@ export class InstanceService extends APIService {
throw error?.response?.data;
});
}
/**
* Disables the email configuration
* @returns {Promise<void>} Promise resolving to void
* @throws {Error} If the API request fails
*/
async disableEmail(): Promise<void> {
return this.delete("/api/instances/configurations/disable-email-feature/")
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
}