summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/aws.ts
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-08 20:21:02 -0500
committerDax Raad <[email protected]>2025-11-08 20:21:02 -0500
commit4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99 (patch)
tree1c0b14810b8919e0d9dba022384da876717f8e2e /packages/console/core/src/aws.ts
parent4bb7ea91271e85621a1394c70867ddc26be45631 (diff)
parent969af4d54122b727d7251b2977f617424d08e4cb (diff)
downloadopencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.tar.gz
opencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.zip
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'packages/console/core/src/aws.ts')
-rw-r--r--packages/console/core/src/aws.ts53
1 files changed, 25 insertions, 28 deletions
diff --git a/packages/console/core/src/aws.ts b/packages/console/core/src/aws.ts
index ce4a20f44..e87ada6ef 100644
--- a/packages/console/core/src/aws.ts
+++ b/packages/console/core/src/aws.ts
@@ -24,40 +24,37 @@ export namespace AWS {
body: z.string(),
}),
async (input) => {
- const res = await createClient().fetch(
- "https://email.us-east-1.amazonaws.com/v2/email/outbound-emails",
- {
- method: "POST",
- headers: {
- "X-Amz-Target": "SES.SendEmail",
- "Content-Type": "application/json",
+ const res = await createClient().fetch("https://email.us-east-1.amazonaws.com/v2/email/outbound-emails", {
+ method: "POST",
+ headers: {
+ "X-Amz-Target": "SES.SendEmail",
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ FromEmailAddress: `OpenCode Zen <[email protected]>`,
+ Destination: {
+ ToAddresses: [input.to],
},
- body: JSON.stringify({
- FromEmailAddress: `OpenCode Zen <[email protected]>`,
- Destination: {
- ToAddresses: [input.to],
- },
- Content: {
- Simple: {
- Subject: {
+ Content: {
+ Simple: {
+ Subject: {
+ Charset: "UTF-8",
+ Data: input.subject,
+ },
+ Body: {
+ Text: {
Charset: "UTF-8",
- Data: input.subject,
+ Data: input.body,
},
- Body: {
- Text: {
- Charset: "UTF-8",
- Data: input.body,
- },
- Html: {
- Charset: "UTF-8",
- Data: input.body,
- },
+ Html: {
+ Charset: "UTF-8",
+ Data: input.body,
},
},
},
- }),
- },
- )
+ },
+ }),
+ })
if (!res.ok) {
throw new Error(`Failed to send email: ${res.statusText}`)
}