Skip to content

Commit

Permalink
chore(emails): Normalizing sendEmail with SMTP method result
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Jan 1, 2025
1 parent c64debc commit 735f127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/emails/src/providers/smtp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const sendEmail = async (
headers: { Authorization: `Bearer ${smtpConfig.auth.pass}` },
},
);
return { status: 202, message: `emailId: #${data.id}` };
return { status: 202, message: data.id };
} catch (err: any) {
if (err.response) {
const error: any = new Error('Error sending email with Resend API');
Expand All @@ -107,7 +107,7 @@ const sendEmail = async (
}
if (transporter) {
const info = await transporter.sendMail(mailOptions);
return { status: 202, message: `messageId: #${info.messageId}` };
return { status: 202, message: info.messageId };
}
throw new Error('Error configuring SMTP settings');
};
Expand Down

0 comments on commit 735f127

Please sign in to comment.