Skip to Content
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.


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"] = ""
attr[""] = [""]
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 ?



capture.jpg (19.0 kB)