Added send-email feature

This commit is contained in:
2023-09-11 21:58:24 +04:00
parent 6d45d1c604
commit a1b3d23c37
10 changed files with 161 additions and 38 deletions

14
src/app/schemas/main.py Normal file
View File

@@ -0,0 +1,14 @@
from dataclasses import dataclass
from typing import Optional
from fastapi import Form
from pydantic import EmailStr
@dataclass
class SendEmail:
name: str = Form(..., max_length=50)
email: EmailStr = Form(...)
phone: Optional[str] = Form(None, max_length=20)
message: str = Form(..., max_length=1000)