Email attachment received as 'noname'
Your header isn't correct. filename
is the attribute not a string.
# Add header to variable with attachment file
attach_file.add_header('Content-Disposition', 'attachment', filename=attachment)
# Then attach to message attachment file
message.attach(attach_file)