Fix template mailer spec missing an optional param
Allow file or api syntaxes for file attachments and images