Sending Email Attachments With Webscript

In response to a feature request posted to our forum earlier this week, we've recently added support for sending email attachments from Webscript.

To attach a file to an email, just add an attachments parameter:

email.send {
  ...
  attachments = {
    { filename = 'hello.txt', content = 'Hello, World!', type = 'text/plain' }
  }
}

See the email.send documentation for details on the attachments parameter.

We've added a couple of new examples that make use of email attachments:

Email attachments also work with our new alerts feature.

Note that all scripts on Webscript are limited to 10MB of RAM and 10 seconds of execution time per invocation, so you may bump into these limits if you're dealing with large attachments.

The Webscript forum is a great way to get help or request new features. We're always happy to hear from people who are trying to do new things with Webscript.