Replies: 1 comment 2 replies
-
The easiest solution is probably to loop over your list and send a separate message to each recipient, with whatever changes you need for their ics attachment: for to_email in list_emails:
msg = AnymailMessage(
subject=subject, body=body, from_email=from_email, to=[to_email]
)
msg.attach(
"meeting_invite.ics",
# Apply whatever changes you want for this recipient:
customize_ics_for_invitee(meeting_invite, to_email),
"text/calendar")
msg.send() (Anymail has some batch sending features that can use a single Django (As a general rule, if you want to send different emails to different recipients, it's usually simpler to just do that with a loop in your code like shown above, rather than trying to use Anymail's batch sending.) |
Beta Was this translation helpful? Give feedback.
-
Reporting an error? It's helpful to know:
I have some changes in ics file for each recipient and want to make sure that each recipient gets their own ics file instead of one attachment for all emails like below.
Beta Was this translation helpful? Give feedback.
All reactions