@@ -97,7 +97,7 @@ void testEmailWithAllOptions() throws Exception {
9797 assertTrue (body .contains ("\" to\" :[\" recipient1@example.com\" ,\" recipient2@example.com\" ]" ));
9898 assertTrue (body .contains ("\" cc\" :[\" cc@example.com\" ]" ));
9999 assertTrue (body .contains ("\" bcc\" :[\" bcc@example.com\" ]" ));
100- assertTrue (body .contains ("\" reply_to\" :\" reply@example.com\" " ));
100+ assertTrue (body .contains ("\" reply_to\" :[ \" reply@example.com\" ] " ));
101101 assertTrue (body .contains ("\" subject\" :\" Welcome!\" " ));
102102 assertTrue (body .contains ("\" html\" :\" <p>Hello <b>World</b></p>\" " ));
103103 assertTrue (body .contains ("\" text\" :\" Hello World\" " ));
@@ -179,6 +179,46 @@ void testSingleHeaderMethod() throws Exception {
179179 assertTrue (body .contains ("\" X-Second\" :\" value2\" " ));
180180 }
181181
182+ @ Test
183+ void testReplyToSingleString () throws Exception {
184+ mockWebServer .enqueue (new MockResponse ()
185+ .setBody ("{\" message_id\" : \" msg_123\" , \" status\" : \" queued\" }" )
186+ .setHeader ("Content-Type" , "application/json" ));
187+
188+ lettermint .email ()
189+ .from ("sender@example.com" )
190+ .to ("recipient@example.com" )
191+ .subject ("Test" )
192+ .text ("Test" )
193+ .replyTo ("reply@example.com" )
194+ .send ();
195+
196+ RecordedRequest request = mockWebServer .takeRequest ();
197+ String body = request .getBody ().readUtf8 ();
198+
199+ assertTrue (body .contains ("\" reply_to\" :[\" reply@example.com\" ]" ));
200+ }
201+
202+ @ Test
203+ void testReplyToMultipleAddresses () throws Exception {
204+ mockWebServer .enqueue (new MockResponse ()
205+ .setBody ("{\" message_id\" : \" msg_123\" , \" status\" : \" queued\" }" )
206+ .setHeader ("Content-Type" , "application/json" ));
207+
208+ lettermint .email ()
209+ .from ("sender@example.com" )
210+ .to ("recipient@example.com" )
211+ .subject ("Test" )
212+ .text ("Test" )
213+ .replyTo ("reply1@example.com" , "reply2@example.com" )
214+ .send ();
215+
216+ RecordedRequest request = mockWebServer .takeRequest ();
217+ String body = request .getBody ().readUtf8 ();
218+
219+ assertTrue (body .contains ("\" reply_to\" :[\" reply1@example.com\" ,\" reply2@example.com\" ]" ));
220+ }
221+
182222 @ Test
183223 void testSingleMetadataMethod () throws Exception {
184224 mockWebServer .enqueue (new MockResponse ()
0 commit comments