You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Count the number of bounced mail using message timeline
157
+
msg_timeline = tx.message_timeline()
158
+
num_bounced =0
159
+
for m in msg_timeline:
160
+
print('--')
161
+
print(f'message id: {m.MessageID}')
162
+
ifstr.lower(m.Status) =='bounced':
163
+
num_bounced +=1
164
+
print(f'bounce type: {m.BounceType}')
165
+
print(f'bounce category: {m.BounceCategory}')
166
+
print('--')
167
+
print(f"total bounces: {num_bounced}")
168
+
```
169
+
123
170
## Handling errors
124
171
If the Campaign Monitor API returns an error, an exception will be raised. For example, if you attempt to create a campaign and enter empty values for subject and other required fields:
0 commit comments