feat: add option to disable TLS for email sending

This commit is contained in:
Elias Schneider
2024-11-28 12:13:23 +01:00
parent 7d6b1d19e9
commit f9fa2c6706
6 changed files with 23 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ export type AllAppConfig = AppConfig & {
smtpFrom: string;
smtpUser: string;
smtpPassword: string;
smtpTls: boolean;
smtpSkipCertVerify: boolean;
};

View File

@@ -28,6 +28,7 @@
smtpUser: appConfig.smtpUser,
smtpPassword: appConfig.smtpPassword,
smtpFrom: appConfig.smtpFrom,
smtpTls: appConfig.smtpTls,
smtpSkipCertVerify: appConfig.smtpSkipCertVerify
};
@@ -37,6 +38,7 @@
smtpUser: z.string().min(1),
smtpPassword: z.string().min(1),
smtpFrom: z.string().email(),
smtpTls: z.boolean(),
smtpSkipCertVerify: z.boolean()
});
@@ -79,12 +81,18 @@
</script>
<form onsubmit={onSubmit}>
<div class="mt-5 grid grid-cols-1 gap-5 md:grid-cols-2">
<div class="mt-5 grid grid-cols-1 gap-5 md:grid-cols-2 items-start">
<FormInput label="SMTP Host" bind:input={$inputs.smtpHost} />
<FormInput label="SMTP Port" type="number" bind:input={$inputs.smtpPort} />
<FormInput label="SMTP User" bind:input={$inputs.smtpUser} />
<FormInput label="SMTP Password" type="password" bind:input={$inputs.smtpPassword} />
<FormInput label="SMTP From" bind:input={$inputs.smtpFrom} />
<CheckboxWithLabel
id="tls"
label="TLS"
description="Enable TLS for the SMTP connection."
bind:checked={$inputs.smtpTls.value}
/>
<CheckboxWithLabel
id="skip-cert-verify"
label="Skip Certificate Verification"