-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_email.py
More file actions
38 lines (32 loc) · 1.08 KB
/
Copy pathtest_email.py
File metadata and controls
38 lines (32 loc) · 1.08 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
import os
from dotenv import load_dotenv
from email_notifier import EmailNotifier
import logging
logging.basicConfig(level=logging.INFO)
load_dotenv()
smtp_server = os.getenv('SMTP_SERVER')
smtp_port = os.getenv('SMTP_PORT', '587')
smtp_username = os.getenv('SMTP_USERNAME')
smtp_password = os.getenv('SMTP_PASSWORD')
target_emails = os.getenv('TARGET_EMAILS')
notifier = EmailNotifier(smtp_server, smtp_port, smtp_username, smtp_password, target_emails)
test_hackathons = [
{
'url': 'https://facebook.com/test',
'analysis': {
'event_name': 'GDG Delta Hackathon 2025',
'event_date': '2025-05-15',
'location': 'جامعة الزقازيق',
'deadline': '2025-05-01',
'prizes': '10,000 جنيه',
'requirements': 'فرق من 3-5 أفراد',
'confidence': 0.95
}
}
]
print("Testing Email Notifier...")
success = notifier.send_daily_summary(test_hackathons)
if success:
print("✅ Test Email sent successfully to:", target_emails)
else:
print("❌ Failed to send Test Email.")