resend 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/interfaces.d.ts +2 -0
- package/build/src/resend.spec.js +17 -0
- package/package.json +1 -1
package/build/package.json
CHANGED
|
@@ -8,6 +8,8 @@ export interface SendEmailData {
|
|
|
8
8
|
bcc?: string | string[];
|
|
9
9
|
/** Cc recipient email address. Max 50. */
|
|
10
10
|
cc?: string | string[];
|
|
11
|
+
/** Reply-to email address. Max 50. */
|
|
12
|
+
reply_to?: string | string[];
|
|
11
13
|
/** Email subject. */
|
|
12
14
|
subject?: string;
|
|
13
15
|
/** The HTML version of the message. */
|
package/build/src/resend.spec.js
CHANGED
|
@@ -86,4 +86,21 @@ describe('Resend', () => {
|
|
|
86
86
|
const data = yield resend.sendEmail(payload);
|
|
87
87
|
expect(data).toMatchSnapshot();
|
|
88
88
|
}));
|
|
89
|
+
it('sends email with multiple reply_to emails', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
90
|
+
const payload = {
|
|
91
|
+
from: 'admin@resend.com',
|
|
92
|
+
to: 'bu@resend.com',
|
|
93
|
+
reply_to: ['foo@resend.com', 'bar@resend.com'],
|
|
94
|
+
subject: 'Hello World',
|
|
95
|
+
};
|
|
96
|
+
mock.onPost('https://api.resend.com/email', payload).replyOnce(200, {
|
|
97
|
+
id: '1234',
|
|
98
|
+
from: 'admin@resend.com',
|
|
99
|
+
to: 'bu@resend.com',
|
|
100
|
+
reply_to: ['foo@resend.com', 'bar@resend.com'],
|
|
101
|
+
created_at: '123',
|
|
102
|
+
});
|
|
103
|
+
const data = yield resend.sendEmail(payload);
|
|
104
|
+
expect(data).toMatchSnapshot();
|
|
105
|
+
}));
|
|
89
106
|
});
|