@@ -78,6 +81,7 @@
id={input.name}
label={input.label}
placeholder={input.placeholder}
+ required={!input.optional}
bind:value={$providerParams[$provider][input.name]}>
@@ -90,6 +94,7 @@
id={input.name}
label={input.label}
placeholder={input.placeholder}
+ required={!input.optional}
bind:value={$providerParams[$provider][input.name]}>
@@ -101,6 +106,7 @@
@@ -112,11 +118,19 @@
{input.description}
+ {:else if input.type === 'select'}
+
{/if}
{/each}
diff --git a/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte b/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte
index 22682db74e..cb243b4362 100644
--- a/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte
+++ b/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte
@@ -6,6 +6,7 @@
import { FormList, InputText } from '$lib/elements/forms';
import { Pill } from '$lib/elements';
import { Providers } from '../../provider.svelte';
+ import { SMTPEncryption } from '@appwrite.io/console';
let name = '';
let showCustomId = false;
@@ -91,6 +92,24 @@
replyToName: ''
};
break;
+ case Providers.SMTP:
+ $providerParams[$provider] = {
+ providerId: id,
+ name: name,
+ enabled: true,
+ host: '',
+ port: 587,
+ username: '',
+ password: '',
+ autoTLS: true,
+ encryption: SMTPEncryption.Tls,
+ mailer: '',
+ fromEmail: '',
+ fromName: '',
+ replyToEmail: '',
+ replyToName: ''
+ };
+ break;
case Providers.FCM:
$providerParams[$provider] = {
providerId: id,
@@ -116,7 +135,7 @@
Provider
-
+
+ imageIcon={option.imageIcon}
+ icon={option.classIcon}>
{option.title}
{#if option.description}
{option.description}
diff --git a/src/routes/console/project-[project]/messaging/providers/wizard/store.ts b/src/routes/console/project-[project]/messaging/providers/wizard/store.ts
index 07b097e075..f6894ad47e 100644
--- a/src/routes/console/project-[project]/messaging/providers/wizard/store.ts
+++ b/src/routes/console/project-[project]/messaging/providers/wizard/store.ts
@@ -1,6 +1,6 @@
import { writable } from 'svelte/store';
import type { Providers } from '../../provider.svelte';
-import type { MessagingProviderType } from '@appwrite.io/console';
+import type { MessagingProviderType, SMTPEncryption } from '@appwrite.io/console';
type ProviderParams = {
providerId: string;
@@ -64,6 +64,20 @@ export type SendgridProviderParams = ProviderParams & {
apiKey: string;
};
+export type SMTPProviderParams = ProviderParams & {
+ fromEmail: string;
+ fromName: string;
+ replyToEmail: string;
+ replyToName: string;
+ host: string;
+ port: number;
+ username: string;
+ password: string;
+ encryption: SMTPEncryption;
+ autoTLS: boolean;
+ mailer: string;
+};
+
/**
* Push providers
*/
@@ -93,6 +107,7 @@ export const providerParams = writable<{
vonage: Partial;
mailgun: Partial;
sendgrid: Partial;
+ smtp: Partial;
fcm: Partial;
apns: Partial;
}>({
@@ -103,6 +118,7 @@ export const providerParams = writable<{
vonage: null,
mailgun: null,
sendgrid: null,
+ smtp: null,
fcm: null,
apns: null
});