Add test email sending dialog

This commit is contained in:
Johannes Zellner
2025-03-09 20:27:41 +01:00
parent 8e8737c4df
commit 7beddf3019
2 changed files with 36 additions and 1 deletions
+11
View File
@@ -226,6 +226,17 @@ function create() {
if (result.status !== 200) return [result];
return [null];
},
async sendTestMail(domain, mailToAddress) {
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/mail/${domain}/send_test_mail`, { to: mailToAddress }, { access_token: accessToken });
} catch (e) {
return [e];
}
if (result.status !== 202) return [result];
return [null];
}
};
}