Spaces:
Sleeping
Sleeping
Commit ·
a26fdff
1
Parent(s): 6639c7b
Update sender email address and SMTP settings in EmailService
Browse files- service.py +8 -3
service.py
CHANGED
|
@@ -11,7 +11,7 @@ class EmailService:
|
|
| 11 |
try:
|
| 12 |
|
| 13 |
message = EmailMessage()
|
| 14 |
-
message["From"] = f"KittyKat Agents
|
| 15 |
message["To"] = recipient
|
| 16 |
message["Subject"] = "Test Email from KittyKat Agents"
|
| 17 |
message.set_content(
|
|
@@ -20,11 +20,16 @@ class EmailService:
|
|
| 20 |
|
| 21 |
await aiosmtplib.send(
|
| 22 |
message,
|
| 23 |
-
hostname="smtp.
|
| 24 |
port=587,
|
| 25 |
-
username="
|
| 26 |
password=os.getenv("EMAIL_PASSWORD"),
|
| 27 |
start_tls=True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
)
|
| 29 |
except Exception as e:
|
| 30 |
print(f"Error sending test email: {e}")
|
|
|
|
| 11 |
try:
|
| 12 |
|
| 13 |
message = EmailMessage()
|
| 14 |
+
message["From"] = f"KittyKat Agents"
|
| 15 |
message["To"] = recipient
|
| 16 |
message["Subject"] = "Test Email from KittyKat Agents"
|
| 17 |
message.set_content(
|
|
|
|
| 20 |
|
| 21 |
await aiosmtplib.send(
|
| 22 |
message,
|
| 23 |
+
hostname="smtp.office365.com",
|
| 24 |
port=587,
|
| 25 |
+
username="noreply@kittykat.ai",
|
| 26 |
password=os.getenv("EMAIL_PASSWORD"),
|
| 27 |
start_tls=True
|
| 28 |
+
# hostname="smtp.gmail.com",
|
| 29 |
+
# port=587,
|
| 30 |
+
# username="hariprasath137@gmail.com",
|
| 31 |
+
# password=os.getenv("EMAIL_PASSWORD"),
|
| 32 |
+
# start_tls=True
|
| 33 |
)
|
| 34 |
except Exception as e:
|
| 35 |
print(f"Error sending test email: {e}")
|