Skip to content

Commit 6f2af9c

Browse files
committed
Fixed a comma error for recipients in shuffle emails
1 parent 9666d70 commit 6f2af9c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

email/1.3.0/src/app.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,21 @@ def send_email_shuffle(self, apikey, recipients, subject, body):
6767
elif "," in recipients:
6868
targets = recipients.split(",")
6969

70-
data = {"targets": targets, "body": body, "subject": subject, "type": "alert", "email_app": True}
70+
newtargets = []
71+
for target in targets:
72+
newtarget = target.strip()
73+
if newtarget:
74+
newtargets.append(newtarget)
75+
76+
targets = newtargets
77+
78+
data = {
79+
"targets": targets,
80+
"body": body,
81+
"subject": subject,
82+
"type": "alert",
83+
"email_app": True,
84+
}
7185

7286
url = "https://shuffler.io/functions/sendmail"
7387
headers = {"Authorization": "Bearer %s" % apikey}

0 commit comments

Comments
 (0)