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, }