Spaces:
Sleeping
Sleeping
app name
Browse files- app.py +1 -1
- gmail_service.py +6 -1
app.py
CHANGED
|
@@ -48,7 +48,7 @@ async def lifespan(app: FastAPI):
|
|
| 48 |
|
| 49 |
# Create FastAPI application
|
| 50 |
app = FastAPI(
|
| 51 |
-
title="
|
| 52 |
description="API for receiving and processing encrypted user data",
|
| 53 |
version="1.0.0",
|
| 54 |
lifespan=lifespan
|
|
|
|
| 48 |
|
| 49 |
# Create FastAPI application
|
| 50 |
app = FastAPI(
|
| 51 |
+
title="APIGateway",
|
| 52 |
description="API for receiving and processing encrypted user data",
|
| 53 |
version="1.0.0",
|
| 54 |
lifespan=lifespan
|
gmail_service.py
CHANGED
|
@@ -58,7 +58,12 @@ class GmailService:
|
|
| 58 |
try:
|
| 59 |
message = MIMEMultipart()
|
| 60 |
message['to'] = to_email
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
message['subject'] = subject
|
| 63 |
message.attach(MIMEText(body, 'plain'))
|
| 64 |
|
|
|
|
| 58 |
try:
|
| 59 |
message = MIMEMultipart()
|
| 60 |
message['to'] = to_email
|
| 61 |
+
# Format sender with display name
|
| 62 |
+
sender_name = "AnimateImage"
|
| 63 |
+
if "<" not in self.sender_email:
|
| 64 |
+
message['from'] = f"{sender_name} <{self.sender_email}>"
|
| 65 |
+
else:
|
| 66 |
+
message['from'] = self.sender_email
|
| 67 |
message['subject'] = subject
|
| 68 |
message.attach(MIMEText(body, 'plain'))
|
| 69 |
|