Simple sendmail function that adds an attachment

Simple sendmail function that adds an attachment

Is there a simple script that I can use to add an attachment from Documents?  When I choose "Send Mail," it allows me to add a document, but when I add the SendMail script in deluge script, it doesn't allow me to attach anything.

Any thoughts on how to write a script that allows me to add an attachment from Documents?