@@ -109,3 +109,50 @@ def test_cancel_scheduled_email(self) -> None:
109109 email_id = "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
110110 )
111111 assert email ["id" ] == "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
112+
113+ def test_email_send_with_attachment (self ) -> None :
114+ self .set_mock_json (
115+ {
116+ "id" : "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" ,
117+ }
118+ )
119+
120+ attachment : resend .Attachment = {
121+ "filename" : "test.pdf" ,
122+ "content" : [1 , 2 , 3 , 4 , 5 ],
123+ "content_type" : "application/pdf" ,
124+ }
125+
126+ params : resend .Emails .SendParams = {
127+ "to" : "to@email.com" ,
128+ "from" : "from@email.com" ,
129+ "subject" : "subject" ,
130+ "html" : "html" ,
131+ "attachments" : [attachment ],
132+ }
133+ email : resend .Email = resend .Emails .send (params )
134+ assert email ["id" ] == "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
135+
136+ def test_email_send_with_inline_attachment (self ) -> None :
137+ self .set_mock_json (
138+ {
139+ "id" : "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" ,
140+ }
141+ )
142+
143+ attachment : resend .Attachment = {
144+ "filename" : "image.png" ,
145+ "content" : [1 , 2 , 3 , 4 , 5 ],
146+ "content_type" : "image/png" ,
147+ "inline_content_id" : "my-image" ,
148+ }
149+
150+ params : resend .Emails .SendParams = {
151+ "to" : "to@email.com" ,
152+ "from" : "from@email.com" ,
153+ "subject" : "subject" ,
154+ "html" : '<img src="cid:my-image" />' ,
155+ "attachments" : [attachment ],
156+ }
157+ email : resend .Email = resend .Emails .send (params )
158+ assert email ["id" ] == "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
0 commit comments