Skip to content

Commit 9bf5b7b

Browse files
chore: wip
1 parent 818b63b commit 9bf5b7b

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

storage/framework/actions/src/UserShowOrmAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default new Action({
1414
},
1515
to: 'chrisbreuer93@gmail.com',
1616
subject: 'Test Email',
17-
template: 'test.html',
17+
text: 'test',
1818
})
1919

2020
// async handle(request: UserRequestType) {

storage/framework/core/email/src/drivers/base.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ export abstract class BaseEmailDriver implements EmailDriver {
3535
throw new Error('Email subject is required')
3636
}
3737

38-
if (!message.template) {
39-
throw new Error('Email template path is required')
40-
}
41-
4238
return true
4339
}
4440

storage/framework/core/email/src/drivers/mailtrap.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ export class MailtrapDriver extends BaseEmailDriver {
9292
}
9393

9494
private async sendWithRetry(payload: any, attempt = 1): Promise<any> {
95-
const endpoint = this.inboxId
96-
? `https://sandbox.api.mailtrap.io/send/${this.inboxId}`
97-
: 'https://sandbox.api.mailtrap.io/send'
95+
if (!this.inboxId) {
96+
throw new Error('Mailtrap inbox ID is required but not provided. Please set MAILTRAP_INBOX_ID in your environment variables.')
97+
}
98+
99+
const endpoint = `https://sandbox.api.mailtrap.io/api/send/${this.inboxId}`
98100

99101
try {
100102
const response = await fetch(endpoint, {

0 commit comments

Comments
 (0)