The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Smtp username (#14134)
neo7736eb9a4e02423
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.tsindex c9415e1ecef..92fd89aefd8 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -4273,7 +4273,7 @@ export type GetConnectedImapSmtpCaldavAccountQueryVariables = Exact<{}>;-export type GetConnectedImapSmtpCaldavAccountQuery = { __typename?: 'Query', getConnectedImapSmtpCaldavAccount: { __typename?: 'ConnectedImapSmtpCaldavAccount', id: string, handle: string, provider: string, accountOwnerId: string, connectionParameters?: { __typename?: 'ImapSmtpCaldavConnectionParameters', IMAP?: { __typename?: 'ConnectionParametersOutput', host: string, port: number, secure?: boolean | null, password: string } | null, SMTP?: { __typename?: 'ConnectionParametersOutput', host: string, port: number, secure?: boolean | null, password: string } | null, CALDAV?: { __typename?: 'ConnectionParametersOutput', host: string, username?: string | null, password: string } | null } | null } };+export type GetConnectedImapSmtpCaldavAccountQuery = { __typename?: 'Query', getConnectedImapSmtpCaldavAccount: { __typename?: 'ConnectedImapSmtpCaldavAccount', id: string, handle: string, provider: string, accountOwnerId: string, connectionParameters?: { __typename?: 'ImapSmtpCaldavConnectionParameters', IMAP?: { __typename?: 'ConnectionParametersOutput', host: string, port: number, secure?: boolean | null, password: string } | null, SMTP?: { __typename?: 'ConnectionParametersOutput', host: string, username?: string | null, port: number, secure?: boolean | null, password: string } | null, CALDAV?: { __typename?: 'ConnectionParametersOutput', host: string, username?: string | null, password: string } | null } | null } };export type CreateDatabaseConfigVariableMutationVariables = Exact<{key: Scalars['String'];@@ -8239,6 +8239,7 @@ export const GetConnectedImapSmtpCaldavAccountDocument = gql`}SMTP {host+ usernameportsecurepassworddiff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsxindex 4fb0d853e4d..29879764b8f 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx@@ -202,6 +202,22 @@ export const SettingsAccountsConnectionForm = ({)}/>+ <Controller+ name="SMTP.username"+ control={control}+ render={({ field, fieldState }) => (+ <SettingsTextInput+ instanceId="smtp-username-connection-form"+ label={t`SMTP Username`}+ placeholder={t`john.doe`}+ type="text"+ value={field.value || ''}+ onChange={field.onChange}+ error={fieldState.error?.message}+ />+ )}+ />+<Controllername="SMTP.password"control={control}diff --git a/packages/twenty-front/src/modules/settings/accounts/graphql/queries/getConnectedImapSmtpCaldavAccount.ts b/packages/twenty-front/src/modules/settings/accounts/graphql/queries/getConnectedImapSmtpCaldavAccount.tsindex 3c923abcbfe..0713b60d2d7 100644--- a/packages/twenty-front/src/modules/settings/accounts/graphql/queries/getConnectedImapSmtpCaldavAccount.ts+++ b/packages/twenty-front/src/modules/settings/accounts/graphql/queries/getConnectedImapSmtpCaldavAccount.ts@@ -16,6 +16,7 @@ export const GET_CONNECTED_IMAP_SMTP_CALDAV_ACCOUNT = gql`}SMTP {host+ usernameportsecurepassworddiff --git a/packages/twenty-front/src/modules/settings/accounts/hooks/useImapSmtpCaldavConnectionForm.ts b/packages/twenty-front/src/modules/settings/accounts/hooks/useImapSmtpCaldavConnectionForm.tsindex 9a6a9d53d0d..d53c3bfb121 100644--- a/packages/twenty-front/src/modules/settings/accounts/hooks/useImapSmtpCaldavConnectionForm.ts+++ b/packages/twenty-front/src/modules/settings/accounts/hooks/useImapSmtpCaldavConnectionForm.ts@@ -49,7 +49,7 @@ export const useImapSmtpCaldavConnectionForm = ({defaultValues: {handle: '',IMAP: { host: '', port: 993, password: '', secure: true },- SMTP: { host: '', port: 587, password: '', secure: true },+ SMTP: { host: '', username: '', port: 587, password: '', secure: true },CALDAV: {host: '',port: 443,diff --git a/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/services/imap-smtp-caldav-connection.service.ts b/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/services/imap-smtp-caldav-connection.service.tsindex 5ac49b712da..3f0f883b435 100644--- a/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/services/imap-smtp-caldav-connection.service.ts+++ b/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/services/imap-smtp-caldav-connection.service.ts@@ -94,7 +94,7 @@ export class ImapSmtpCaldavService {host: params.host,port: params.port,auth: {- user: handle,+ user: params.username ?? handle,pass: params.password,},tls: {diff --git a/packages/twenty-server/src/modules/messaging/message-import-manager/drivers/smtp/providers/smtp-client.provider.ts b/packages/twenty-server/src/modules/messaging/message-import-manager/drivers/smtp/providers/smtp-client.provider.tsindex 2a2f86186f9..34d881c103f 100644--- a/packages/twenty-server/src/modules/messaging/message-import-manager/drivers/smtp/providers/smtp-client.provider.ts+++ b/packages/twenty-server/src/modules/messaging/message-import-manager/drivers/smtp/providers/smtp-client.provider.ts@@ -22,7 +22,7 @@ export class SmtpClientProvider {host: smtpParams.host,port: smtpParams.port,auth: {- user: connectedAccount.handle,+ user: smtpParams.username ?? connectedAccount.handle,pass: smtpParams.password,},tls: {