File size: 559 Bytes
24755f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from fastapi import FastAPI
from service import EmailService

app = FastAPI()


@app.post("/check")
async def check_email_service(
):
    try:
        email_service = EmailService()
        await email_service.send_test_email("dhanush@yuvabe.com")
        return {
            "status_code": 200,
            "message": "Test email sent successfully.",
            "data": None,
        }
    except Exception as e:
        return {
            "status_code": 500,
            "message": f"Failed to send test email: {e}",
            "data": None,
        }