-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple_test_emails.py
More file actions
107 lines (84 loc) · 3.65 KB
/
simple_test_emails.py
File metadata and controls
107 lines (84 loc) · 3.65 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
#!/usr/bin/env python3
"""
Simple test file for AI-customized Gmail-style emails.
"""
import asyncio
import json
import os
from datetime import datetime, timedelta
import pytz
from dotenv import load_dotenv
load_dotenv()
def generate_ai_email(name, company, title, recipient_email):
"""Generate AI-customized email based on profile data."""
first_name = name.split()[0] if name else "Friend"
if 'CEO' in title or 'Founder' in title:
subject = f"Quick question about {company}'s growth strategy"
content = f"""<p>Hi {first_name},</p>
<p>I came across your profile and was impressed by your leadership at {company}.</p>
<p>As {title}, you probably understand the challenges of scaling technology infrastructure while maintaining operational efficiency.</p>
<p>We've helped companies like {company} streamline their cloud architecture and reduce operational costs by up to 40%.</p>
<p>Would you be open to a brief 15-minute call to discuss how we might help {company} with your technology initiatives?</p>
<p>Thanks,<br>
Andreas Garcia<br>
Account Executive<br>
AllCode: <a href="https://allcode.com/">https://allcode.com/</a><br>
LinkedIn Profile: <a href="https://www.linkedin.com/in/andreas-garcia-0a7963139">www.linkedin.com/in/andreas-garcia-0a7963139</a><br>
(415) 890-6431<br>
101 Montgomery Street<br>
San Francisco, CA 94104</p>"""
else:
subject = f"Your work at {company}"
content = f"""<p>Hi {first_name},</p>
<p>I noticed your experience as {title} at {company} and wanted to reach out.</p>
<p>Given your background in technology, you'd probably appreciate our approach to cloud-native architecture and DevOps automation.</p>
<p>We specialize in helping companies like {company} build more scalable, reliable infrastructure.</p>
<p>Would you have 15 minutes to discuss some of the technical challenges you're facing?</p>
<p>Thanks,<br>
Andreas Garcia<br>
Account Executive<br>
AllCode: <a href="https://allcode.com/">https://allcode.com/</a><br>
LinkedIn Profile: <a href="https://www.linkedin.com/in/andreas-garcia-0a7963139">www.linkedin.com/in/andreas-garcia-0a7963139</a><br>
(415) 890-6431<br>
101 Montgomery Street<br>
San Francisco, CA 94104</p>"""
return f"Subject: {subject}\n\n{content}"
def preview_test_emails():
"""Preview the test emails."""
# Test data based on LinkedIn profiles (you can update with real scraped data)
test_contacts = [
{
"name": "Andreas Garcia",
"email": "andreas@allcode.com",
"company": "AllCode",
"title": "CEO & Founder",
"linkedin_url": "https://www.linkedin.com/in/andreas-garcia-0a7963139"
},
{
"name": "Joel Garcia",
"email": "joel@allcode.com",
"company": "AllCode",
"title": "Software Developer",
"linkedin_url": "https://www.linkedin.com/in/joelgarcia/"
}
]
print("📧 AI-customized email previews:")
print("=" * 50)
for i, contact in enumerate(test_contacts, 1):
print(f"\n📤 Test Email {i} - To: {contact['name']} ({contact['email']})")
print(f"🏢 Company: {contact['company']} | Title: {contact['title']}")
print(f"🔗 LinkedIn: {contact['linkedin_url']}")
# Generate AI-customized email
ai_email = generate_ai_email(
contact['name'],
contact['company'],
contact['title'],
contact['email']
)
print("-" * 50)
print(ai_email)
print("-" * 50)
if __name__ == "__main__":
print("🧪 Simple AI Email Test System")
print("=" * 35)
preview_test_emails()