mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-04 13:05:52 +00:00
"Send Testmail" button (not translated) #3050
This commit is contained in:
@@ -165,6 +165,21 @@ const ApplicationSettings = () => {
|
||||
await doRestart();
|
||||
};
|
||||
|
||||
const sendmail = async () => {
|
||||
await sendAPI({
|
||||
device: 'system',
|
||||
cmd: 'sendmail',
|
||||
data: 'testmail',
|
||||
id: 0
|
||||
})
|
||||
.then(() => {
|
||||
toast.success(LL.SUCCESSFUL());
|
||||
})
|
||||
.catch((error: Error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
const boardProfileItems = boardProfileSelectItems();
|
||||
|
||||
const content = () => {
|
||||
@@ -362,8 +377,7 @@ const ApplicationSettings = () => {
|
||||
container
|
||||
spacing={2}
|
||||
direction="row"
|
||||
justifyContent="flex-start"
|
||||
alignItems="flex-start"
|
||||
sx={{ justifyContent: 'flex-start', alignItems: 'flex-start' }}
|
||||
>
|
||||
<Grid>
|
||||
<ValidatedTextField
|
||||
@@ -389,7 +403,10 @@ const ApplicationSettings = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid size={4} mt={!data.email_ssl && !data.email_starttls ? 0 : 3}>
|
||||
<Grid
|
||||
size={4}
|
||||
sx={{ mt: !data.email_ssl && !data.email_starttls ? 0 : 3 }}
|
||||
>
|
||||
{!data.email_starttls && (
|
||||
<BlockFormControlLabel
|
||||
sx={{ width: '12ch' }}
|
||||
@@ -482,6 +499,17 @@ const ApplicationSettings = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Button
|
||||
sx={{ mt: 3 }}
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
disabled={dirtyFlags.length !== 0}
|
||||
onClick={sendmail}
|
||||
>
|
||||
Send Testmail
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -39,7 +39,7 @@ build_flags =
|
||||
-D CONFIG_ASYNC_TCP_PRIORITY=10 ; default
|
||||
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64 ; default
|
||||
-D CONFIG_ASYNC_TCP_RUNNING_CORE=1 ; force async_tcp task to be on same core as Arduino app (default is any core)
|
||||
-D CONFIG_ASYNC_TCP_STACK_SIZE=6144 ; default is 16KB/8192*2
|
||||
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192 ; default is 16KB/8192*2
|
||||
; ESPAsyncWebServer
|
||||
; -D WS_MAX_QUEUED_MESSAGES=0 ; not used, default 8
|
||||
; -D SSE_MAX_QUEUED_MESSAGES=1 ; for log messages, default 32
|
||||
|
||||
Reference in New Issue
Block a user