We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 578c9af commit ee511a2Copy full SHA for ee511a2
examples/batch_email_send.py
@@ -2,6 +2,7 @@
2
from typing import List
3
4
import resend
5
+import resend.exceptions
6
7
if not os.environ["RESEND_API_KEY"]:
8
raise EnvironmentError("RESEND_API_KEY is missing")
@@ -22,6 +23,12 @@
22
23
},
24
]
25
-emails = resend.Batch.send(params)
26
+try:
27
+ emails = resend.Batch.send(params)
28
+except resend.exceptions.ResendError as e:
29
+ print("Failed to send batch emails")
30
+ print(f"Error: {e}")
31
+ exit(1)
32
+
33
for email in emails:
34
print(f"Email sent with id: {email.id}")
resend/version.py
@@ -1,4 +1,4 @@
1
-__version__ = "1.0.2"
+__version__ = "1.1.0"
def get_version() -> str:
0 commit comments