fixed batchMail?
All checks were successful
Build and Deploy Backend / build_and_deploy (push) Successful in 20s
All checks were successful
Build and Deploy Backend / build_and_deploy (push) Successful in 20s
This commit is contained in:
parent
30f89602f3
commit
34ed6f3144
1 changed files with 7 additions and 7 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from mailtrap import Address
|
||||
from mailtrap import BatchMail
|
||||
from pathlib import Path
|
||||
from backend.config import MAILTRAP_API_TOKEN
|
||||
from mailtrap import BatchEmailRequest
|
||||
|
|
@ -64,13 +66,11 @@ def send_batch_mail(mails: list[BatchEmailRequest]):
|
|||
else:
|
||||
client = mt.MailtrapClient(token=MAILTRAP_API_TOKEN)
|
||||
params = BatchSendEmailParams(
|
||||
base={
|
||||
"from": {
|
||||
"name": "Blauwasser Mausis",
|
||||
"email": "newsletter@blauwasser-mausis.de"
|
||||
},
|
||||
"subject": "Flaschenpost | Blauwasser Mausis",
|
||||
},
|
||||
base=BatchMail(
|
||||
sender=Address(
|
||||
email="newsletter@blauwasser-mausis.de",
|
||||
name="Blauwasser Mausis"),
|
||||
subject="Flaschenpost | Blauwasser Mausis"),
|
||||
requests=mails
|
||||
)
|
||||
client.batch_send(params)
|
||||
Loading…
Add table
Reference in a new issue