We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da09a2a commit cc28ba8Copy full SHA for cc28ba8
1 file changed
apps/sim/app/api/tools/mail/send/route.ts
@@ -1,4 +1,5 @@
1
import { createLogger } from '@sim/logger'
2
+import { convert } from 'html-to-text'
3
import { type NextRequest, NextResponse } from 'next/server'
4
import { Resend } from 'resend'
5
import { mailSendContract } from '@/lib/api/contracts/tools/mail'
@@ -74,7 +75,7 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
74
75
emailData = {
76
...emailBase,
77
html: validatedData.body,
- text: validatedData.body.replace(/<[^>]*>/g, ''),
78
+ text: convert(validatedData.body, { wordwrap: false }),
79
}
80
} else {
81
0 commit comments