-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenhanced_quick_search.py
More file actions
154 lines (134 loc) Β· 5.29 KB
/
Copy pathenhanced_quick_search.py
File metadata and controls
154 lines (134 loc) Β· 5.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/usr/bin/env python3
"""
Enhanced Quick Apartment Search and Email
Beautiful HTML emails with Google Maps integration
"""
import os
import sys
from dotenv import load_dotenv
load_dotenv()
sys.path.insert(0, '/Users/comradeflats/Desktop/rent_hunting_agentic_AI')
def get_apartments():
"""Sample apartments for Texas City, Texas under $2000"""
return [
{
"name": "Bayview Gardens",
"address": "1234 Bay Street, Texas City, TX 77590",
"price": "$1,850/month",
"beds": 2,
"baths": 2,
"amenities": "Pool, Gym, Parking, Pet-friendly",
"contact": "(409) 948-1234"
},
{
"name": "Gulf Coast Commons",
"address": "5678 Gulf Shore Blvd, Texas City, TX 77591",
"price": "$1,750/month",
"beds": 2,
"baths": 2,
"amenities": "Balcony, Laundry in unit, Parking",
"contact": "(409) 948-5678"
},
{
"name": "Texas City Heights",
"address": "9876 Heights Drive, Texas City, TX 77590",
"price": "$1,950/month",
"beds": 2,
"baths": 2.5,
"amenities": "Garage, Pool, Security, Near shopping",
"contact": "(409) 948-9876"
},
{
"name": "Coastal Living Apartments",
"address": "2468 Coastal Way, Texas City, TX 77591",
"price": "$1,650/month",
"beds": 2,
"baths": 1.5,
"amenities": "Beach access, Parking, Gym",
"contact": "(409) 948-2468"
},
{
"name": "Marina Point Residences",
"address": "1357 Marina Circle, Texas City, TX 77590",
"price": "$1,900/month",
"beds": 2,
"baths": 2,
"amenities": "Marina views, Pool, Concierge, Pet spa",
"contact": "(409) 948-1357"
}
]
def send_enhanced_apartment_email():
"""Send enhanced apartment listings via email with Google Maps integration"""
try:
print("π Gathering apartment data...")
apartments = get_apartments()
print("π§ Creating enhanced email content with Google Maps integration...")
from enhanced_email_utils import send_enhanced_apartment_listings_email
result = send_enhanced_apartment_listings_email(
apartments=apartments,
to_email="ryanwinstonelliott@gmail.com",
search_criteria="2-bedroom apartments under $2,000/month in Texas City, TX",
recipient_name="Ryan"
)
print(f"β
Enhanced email sent! Result: {result}")
print("\nπ Summary sent to your email:")
for i, apt in enumerate(apartments, 1):
print(f"{i:2d}. {apt['name']} - {apt['price']}")
print(f" π {apt['address']}")
print(f" π {apt['contact']}")
print()
return True
except Exception as e:
print(f"β Error: {str(e)}")
import traceback
traceback.print_exc()
return False
def send_enhanced_appointment_email():
"""Send enhanced appointment email with Google Maps and calendar integration"""
try:
print("π
Creating enhanced appointment email...")
from enhanced_email_utils import send_enhanced_apartment_appointment_email
result = send_enhanced_apartment_appointment_email(
name_of_apartment="Bayview Gardens",
address_of_apartment="1234 Bay Street, Texas City, TX 77590",
price_of_apartment="$1,850/month",
appointment_time="2 PM",
appointment_date="tomorrow",
duration_minutes=60,
to_email="ryanwinstonelliott@gmail.com"
)
print(f"β
Enhanced appointment email sent! Result: {result}")
return True
except Exception as e:
print(f"β Error: {str(e)}")
import traceback
traceback.print_exc()
return False
if __name__ == "__main__":
print("π Enhanced Texas City Apartment Search")
print("=" * 50)
print("Demonstrating enhanced email functionality with Google Maps integration...")
print()
# Test enhanced apartment listings email
print("1οΈβ£ Testing enhanced apartment listings email...")
success1 = send_enhanced_apartment_email()
print("\n" + "="*50)
# Test enhanced appointment email
print("2οΈβ£ Testing enhanced appointment email...")
success2 = send_enhanced_appointment_email()
print("\n" + "="*50)
if success1 and success2:
print("β
All tests completed successfully!")
print("π§ Check your email inbox for:")
print(" β’ Beautiful apartment listings with Google Maps links")
print(" β’ Professional appointment email with calendar integration")
print(" β’ Colorful formatting optimized for Gmail")
else:
print("β Some tests failed. Check the errors above.")
print("\nπ¨ Enhanced features include:")
print(" β’ Google Maps integration for each property")
print(" β’ Directions links for easy navigation")
print(" β’ Click-to-call phone numbers")
print(" β’ Beautiful visual card layout")
print(" β’ Gmail-optimized calendar integration")
print(" β’ Professional color schemes and typography")