Skip to Content
0
Nov 15 at 04:29 AM

Error creating email attachment when sending email attachment using "Send Mail" operator

97 Views Last edit Nov 15 at 08:10 AM 2 rev

Hi All

I am facing an error "could not create an attachment" using the "Send Mail" operator in DI.

Attaching the flow for reference.

capture.jpg

I am reading a csv file then converting the file object into a string to send it to python operator to construct the message attributes for "Send Mail" operator as below.

attr = dict()
attr["email.attachments"] = [input_csv_file_msg_string]
attr["email.subject"] = "Test"
attr["email.from"] = "alice@example.com"
attr["email.to"] = ["bob@example.com"]
msgbody = ("Test")
messageout = api.Message(body=msgbody, attributes=attr)

Could you please assist if there are any other attributes I need to construct before sending it to the "Send Email" operator ?

Thanks
Raghav

Attachments

capture.jpg (19.0 kB)