Open agrawald opened 1 week ago
Thanks for reaching out. The Boto3 send_raw_email command calls the SendRawEmail API, so this issue involves the SES service API rather than Boto3 directly.
The issue with your current approach may be with the MIME headers — have you tried creating a new MIMEMultipart object before sending each email?
Have you also tried using the sesv2
client and send_email command? In the SES Developer Guide there is a Boto3 snippet which may help with your use case: https://docs.aws.amazon.com/ses/latest/dg/send-email-raw.html#send-email-raw-api
If still seeing an issue, can you provide a complete code snippet for reproducing this? And can you also share your debug logs (with any sensitive info redacted) which you can get by adding boto3.set_stream_logger('')
to your script?
Describe the bug
Using boto3 SES send_raw_email method to email to more than 50 recipient. The Bcc (same with To and CC) field is getting accumulated as new entry every time we initialize it.
Regression Issue
Expected Behavior
The
msg[Bcc]
should be overridden instead of accumulating new Bcc entries as shown in Current ebhaviour.Current Behavior
The above code will try to send the
Bcc: 1@email.com, ..., 20@email.com