Skip to content

Commit

Permalink
Fix email provider params
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate authored and TorstenDittmann committed Jan 24, 2024
1 parent e3664b8 commit 1d31cd0
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
isEuRegion: $providerParams[$provider].isEuRegion,
from: $providerParams[$provider].from,
fromEmail: $providerParams[$provider].fromEmail,
fromName: $providerParams[$provider].fromName,
replyToEmail: $providerParams[$provider].replyToEmail,
replyToName: $providerParams[$provider].replyToName,
apiKey: $providerParams[$provider].apiKey,
domain: $providerParams[$provider].domain
}
Expand All @@ -162,7 +165,10 @@
providerId: providerId,
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
from: $providerParams[$provider].from,
fromEmail: $providerParams[$provider].fromEmail,
fromName: $providerParams[$provider].fromName,
replyToEmail: $providerParams[$provider].replyToEmail,
replyToName: $providerParams[$provider].replyToName,
apiKey: $providerParams[$provider].apiKey
}
);
Expand Down
42 changes: 39 additions & 3 deletions src/routes/console/project-[project]/messaging/providers/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const providers: ProvidersMap = {
// [Providers.MQTT]: {
// imageIcon: 'mqtt',
// title: 'MQTT',
// description: 'Message Queuing Telemtry Transport'
// description: 'Message Queuing Telemetry Transport'
// }
}
},
Expand Down Expand Up @@ -178,9 +178,27 @@ export const providers: ProvidersMap = {
},
{
label: 'Sender email',
name: 'from',
name: 'fromEmail',
type: 'email',
placeholder: 'Enter email'
},
{
label: 'Sender name',
name: 'fromName',
type: 'text',
placeholder: 'Enter name'
},
{
label: 'Reply-to email',
name: 'replyToEmail',
type: 'email',
placeholder: 'Enter email'
},
{
label: 'Reply-to name',
name: 'replyToName',
type: 'text',
placeholder: 'Enter name'
}
]
},
Expand All @@ -202,9 +220,27 @@ export const providers: ProvidersMap = {
},
{
label: 'Sender email',
name: 'from',
name: 'fromEmail',
type: 'email',
placeholder: 'Enter email'
},
{
label: 'Sender name',
name: 'fromName',
type: 'text',
placeholder: 'Enter name'
},
{
label: 'Reply-to email',
name: 'replyToEmail',
type: 'email',
placeholder: 'Enter email'
},
{
label: 'Reply-to name',
name: 'replyToName',
type: 'text',
placeholder: 'Enter name'
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
isEuRegion: $providerParams[$provider].isEuRegion,
from: $providerParams[$provider].from,
fromEmail: $providerParams[$provider].fromEmail,
fromName: $providerParams[$provider].fromName,
replyToEmail: $providerParams[$provider].replyToEmail,
replyToName: $providerParams[$provider].replyToName,
apiKey: $providerParams[$provider].apiKey,
domain: $providerParams[$provider].domain
}
Expand All @@ -160,7 +163,10 @@
providerId: providerId,
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
from: $providerParams[$provider].from,
fromEmail: $providerParams[$provider].fromEmail,
fromName: $providerParams[$provider].fromName,
replyToEmail: $providerParams[$provider].replyToEmail,
replyToName: $providerParams[$provider].replyToName,
apiKey: $providerParams[$provider].apiKey
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@
name: name,
enabled: true,
isEuRegion: false,
from: '',
fromEmail: '',
fromName: '',
replyToEmail: '',
replyToName: '',
apiKey: '',
domain: ''
};
Expand All @@ -82,7 +85,10 @@
name: name,
enabled: true,
apiKey: '',
from: ''
fromEmail: '',
fromName: '',
replyToEmail: '',
replyToName: '',
};
break;
case Providers.FCM:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@ export type VonageProviderParams = ProviderParams & {
*/

export type MailgunProviderParams = ProviderParams & {
fromEmail: string;
fromName: string;
replyToEmail: string;
replyToName: string;
isEuRegion: boolean;
from: string;
apiKey: string;
domain: string;
};

export type SendgridProviderParams = ProviderParams & {
from: string;
fromEmail: string;
fromName: string;
replyToEmail: string;
replyToName: string;
apiKey: string;
};

Expand Down

0 comments on commit 1d31cd0

Please sign in to comment.