Skip to content

Commit d384ba1

Browse files
chore: wip
1 parent 9840a5c commit d384ba1

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

config/email.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,26 @@ export default {
2222
server: {
2323
scan: true, // scans for spam and viruses
2424
},
25+
26+
// Add driver configuration
27+
default: env.MAIL_DRIVER || 'ses',
28+
29+
drivers: {
30+
ses: {
31+
region: env.AWS_SES_REGION || 'us-east-1',
32+
credentials: {
33+
accessKeyId: env.AWS_ACCESS_KEY_ID,
34+
secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
35+
},
36+
},
37+
38+
sendgrid: {
39+
apiKey: env.SENDGRID_API_KEY,
40+
},
41+
42+
mailtrap: {
43+
token: env.MAILTRAP_TOKEN,
44+
inboxId: env.MAILTRAP_INBOX_ID,
45+
},
46+
},
2547
} satisfies EmailConfig

storage/framework/core/types/src/email.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,30 @@ export interface EmailOptions {
99
mailboxes: string[]
1010

1111
url: string
12-
charset: string // e.g. UTF-8
12+
charset: string
1313

1414
server: {
1515
scan?: boolean
1616
}
17+
18+
default: 'ses' | 'sendgrid' | 'mailtrap'
19+
20+
drivers: {
21+
ses?: {
22+
region: string
23+
credentials: {
24+
accessKeyId?: string
25+
secretAccessKey?: string
26+
}
27+
}
28+
sendgrid?: {
29+
apiKey?: string
30+
}
31+
mailtrap?: {
32+
token?: string
33+
inboxId?: string | number
34+
}
35+
}
1736
}
1837

1938
export type EmailConfig = Partial<EmailOptions>

0 commit comments

Comments
 (0)