Skip to content

Commit e922b4a

Browse files
committed
fix: final changes to make email app work
1 parent 9666d70 commit e922b4a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

email/1.3.0/src/app.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,19 @@ 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+
data = {"targets": targets, "body": body, "subject": subject, "type": "alert", "email_app": True, "reference_execution": self.current_execution_id}
7171

72-
url = "https://shuffler.io/functions/sendmail"
72+
# url = "https://shuffler.io/functions/sendmail"
73+
74+
url = "https://7692-2405-201-4019-f142-8124-2465-9b7d-4945.ngrok-free.app/functions/sendmail"
75+
76+
print("apikey: ", apikey, " authorization: ", self.authorization)
77+
78+
time.sleep(10)
79+
80+
if apikey.strip() == "" and self.authorization != "standalone":
81+
apikey = self.authorization
82+
7383
headers = {"Authorization": "Bearer %s" % apikey}
7484
return requests.post(url, headers=headers, json=data).text
7585

0 commit comments

Comments
 (0)