Update multimail.py to function

Adjust the 'attachment' logic to allow the script to run