Sample JSON Configurations
Complete JSON examples for all providers and credential types.
Credential Names
Examples below use "email-primary" as the credential name. This is configurable per tenant via TenantSettings. To use a different name, update
Examples below use "email-primary" as the credential name. This is configurable per tenant via TenantSettings. To use a different name, update
TenantSettings.Value where Key='EmailCredentialName'.SMTP with Gmail
{
"provider": "smtp",
"host": "smtp.gmail.com",
"port": 587,
"ssl": false,
"fromEmail": "noreply@yourdomain.com",
"fromName": "Your Application"
}SMTP with Office 365
{
"provider": "smtp",
"host": "smtp.office365.com",
"port": 587,
"ssl": false,
"fromEmail": "notifications@yourdomain.onmicrosoft.com",
"fromName": "System Notifications"
}AWS SES
{
"provider": "ses",
"region": "us-east-1",
"fromEmail": "notifications@yourdomain.com",
"fromName": "BizFirst Notifications"
}Gmail OAuth2
{
"provider": "gmail",
"fromEmail": "service-account@yourdomain.com",
"fromName": "Your Service"
}Note: OAuth2 tokens stored in encrypted EncryptedData field, not DisplayMetadata.
Database INSERT: SMTP
INSERT INTO AIExt_Credentials (
Name, DisplayMetadata, EncryptedData,
TenantID, CredentialTypeID, Enabled,
CreatedOn, CreatedBy
) VALUES (
'email-primary',
'{
"provider": "smtp",
"host": "smtp.gmail.com",
"port": 587,
"ssl": false,
"fromEmail": "noreply@example.com",
"fromName": "BizFirst"
}',
0x..., -- Encrypted password here
1, -- TenantID
1, -- PasswordRecord
1,
GETUTCDATE(),
1
);Database INSERT: SES
INSERT INTO AIExt_Credentials (
Name, DisplayMetadata, EncryptedData,
TenantID, CredentialTypeID, Enabled,
CreatedOn, CreatedBy
) VALUES (
'email-primary',
'{
"provider": "ses",
"region": "us-east-1",
"fromEmail": "noreply@example.com",
"fromName": "My Company"
}',
0x..., -- Encrypted: AccessKeyId + SecretAccessKey
1, 2, 1, GETUTCDATE(), 1
);Database INSERT: Gmail
INSERT INTO AIExt_Credentials (
Name, DisplayMetadata, EncryptedData,
TenantID, CredentialTypeID, Enabled,
CreatedOn, CreatedBy
) VALUES (
'email-primary',
'{
"provider": "gmail",
"fromEmail": "user@gmail.com",
"fromName": "My App"
}',
0x..., -- Encrypted: {accessToken, refreshToken, expiresAt}
1, 3, 1, GETUTCDATE(), 1
);