Can't use my own body :(
This commit is contained in:
+3
-11
@@ -17,16 +17,6 @@ def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client
|
||||
print("No recipient phone number provided for SMS.")
|
||||
return False
|
||||
|
||||
# --- PRINT LINK/INFO BEFORE SENDING ---
|
||||
print("\n" + "="*50)
|
||||
print(f"[Twilio] Preparing SMS for: {to_phone}")
|
||||
print(f"[Twilio] Room Title: {room_title}")
|
||||
if room_link:
|
||||
print(f"[Twilio] Room Link: {room_link}")
|
||||
else:
|
||||
print(f"[Twilio] Link: Invitation email sent to {client_email or 'client inbox'}")
|
||||
print("="*50 + "\n")
|
||||
|
||||
# --- BUILD SMS CONTENT ---
|
||||
body = (
|
||||
f"Alert: A technical issue occurred with your SmartWave equipment/microwave. "
|
||||
@@ -41,10 +31,12 @@ def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client
|
||||
else:
|
||||
body += "An invitation link has been sent to your inbox."
|
||||
|
||||
print(f"Sending SMS to {to_phone} : \"{body}\"")
|
||||
|
||||
try:
|
||||
client = Client(account_sid, auth_token)
|
||||
message = client.messages.create(
|
||||
body=body,
|
||||
body="sms_event_notifications",
|
||||
from_=from_phone,
|
||||
to=to_phone
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user