Skip to content

Commit 1f5b6e1

Browse files
authored
Update get_email_webhook.py
port 5000 not worked
1 parent 1da8675 commit 1f5b6e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

get_email_webhook.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ def health_check():
123123

124124
# --- Main Entry Point ---
125125
if __name__ == "__main__":
126+
port = int(os.getenv("PORT", 8000)) # Use Azure PORT or default 8000
126127
if TEST_MODE:
127128
print("🔹 TEST_MODE: sending test email")
128129
send_email_via_graph(
129130
"[Test] Graph Email",
130131
"This is a test email sent via Microsoft Graph with application permissions."
131132
)
132133
else:
133-
print("✅ Flask is up and listening on /webhook and /health")
134-
app.run(host="0.0.0.0", port=5000)
134+
print(f"✅ Flask is up and listening on /webhook and /health (port {port})")
135+
app.run(host="0.0.0.0", port=port)

0 commit comments

Comments
 (0)