I'm using [`fastapi-mail`](https://github.com/sabuhish/fastapi-mail) package, and trying to send multiple files to multiple email addresses. When I send the email to only one email address, the application works as expected. However, when I change to `List[EmailStr]` for sending to multiple email addresses, I get this error:

```
not a valid email address

```

Here is my code:

```
@app.post("/file")async def send_file(
background_tasks: BackgroundTasks,
email:List[EmailStr] = Form(...), #I Change here before EmailStr = Form(...)
file:Optional[List[UploadFile]] = File(...),) -> JSONResponse:
print(email)
print(file)
message = MessageSchema(
    subject="Fastapi mail module",
    recipients=email,
    body="Simple background task",
    subtype="html",
    attachments=file)

fm = FastMail(ConnectionConfig(
    MAIL_USERNAME=res("MAIL_USERNAME"),
    MAIL_PASSWORD=res("MAIL_PASSWORD"),
    MAIL_FROM="admin@acsebs.com",
    MAIL_PORT=res("MAIL_PORT"),
    MAIL_SERVER=res("MAIL_SERVER"),
    MAIL_FROM_NAME="send attachment email service",
    MAIL_TLS=res("MAIL_TLS"),
    MAIL_SSL=res("MAIL_SSL"),
    USE_CREDENTIALS=res("USE_CREDENTIALS"),
    VALIDATE_CERTS=res("VALIDATE_CERTS")
))

background_tasks.add_task(fm.send_message, message)

return JSONResponse(status_code=200, content={"message": "email has been sent"})

```

Posting data through Swagger UI:
--------------------------------

[![enter image description here](https://i.stack.imgur.com/Z8YFb.png)](https://i.stack.imgur.com/Z8YFb.png)

The error:
----------

[![enter image description here](https://i.stack.imgur.com/zbTO3.png)](https://i.stack.imgur.com/zbTO3.png)