Integrated eMail Support

Using Omni Automation you can construct and manipulate outline documents, apply styles and import data from a variety of sources. And with integrated scripting support for creating and sending email, it becomes easy to automate the sending of outline content and documents. The following documentation demonstrate how to access and use this ability, beginning with a set of parameters for generating an email.

Constructor

Omni Automation in OmniGraffle supports an Email class, design for creating and sending electronic mail messages. To instantiate an instance of this class, it is preceded by the new constructor.

Instance Properties

As with most scriptable objects, an instance of the Email class has properties that define its design and usage. Here is the list of properties for this class:

Instance Functions

The Email class contains a single command generate() for processing instances of the class.

var email = new Email() email.subject = "Omni Automation" email.body = "Greetings!\n\nHere are my suggestions regarding Omni Automation:" email.receiver = "support@omnigroup.com" email.generate()
omnigraffle://localhost/omnijs-run?script=try%7Bvar%20email%20%3D%20new%20Email%28%29%0Aemail%2Esubject%20%3D%20%22Omni%20Automation%22%0Aemail%2Ebody%20%3D%20%22Greetings%21%5Cn%5CnHere%20are%20my%20suggestions%20regarding%20Omni%20Automation%3A%22%0Aemail%2Ereceiver%20%3D%20%22support%40omnigroup%2Ecom%22%0Aemail%2Egenerate%28%29%7Dcatch%28err%29%7Bconsole%2Elog%28err%29%7D

Including Attachments

The following are examples of creating and sending mail messages whose contents are derived from the current document.

var email = new Email() email.subject = "PNG of “" + document.name + "”" email.body = "Here is the exported canvas for you!\n\n" wrapper = document.fileWrapper('public.png') email.fileWrappers = [wrapper] email.generate()
omnigraffle://localhost/omnijs-run?script=try%7Bvar%20email%20%3D%20new%20Email%28%29%0Aemail%2Esubject%20%3D%20%22PNG%20of%20%E2%80%9C%22%20%2B%20document%2Ename%20%2B%20%22%E2%80%9D%22%0Aemail%2Ebody%20%3D%20%22Here%20is%20the%20exported%20canvas%20for%20you%21%5Cn%5Cn%22%0Awrapper%20%3D%20document%2EfileWrapper%28%27public%2Epng%27%29%0Aemail%2EfileWrappers%20%3D%20%5Bwrapper%5D%0Aemail%2Egenerate%28%29%7Dcatch%28err%29%7Bconsole%2Elog%28err%29%7D
var email = new Email() email.subject = "Exports of “" + document.name + "”" email.body = "Here are the exported canvas and file:\n\n" imageWrapper = document.fileWrapper('public.png') documentWrapper = document.fileWrapper('com.omnigroup.omnigraffle.graffle') email.fileWrappers = [imageWrapper, documentWrapper] email.generate()
omnigraffle://localhost/omnijs-run?script=try%7Bvar%20email%20%3D%20new%20Email%28%29%0Aemail%2Esubject%20%3D%20%22Exports%20of%20%E2%80%9C%22%20%2B%20document%2Ename%20%2B%20%22%E2%80%9D%22%0Aemail%2Ebody%20%3D%20%22Here%20are%20the%20exported%20canvas%20and%20file%3A%5Cn%5Cn%22%0AimageWrapper%20%3D%20document%2EfileWrapper%28%27public%2Epng%27%29%0AdocumentWrapper%20%3D%20document%2EfileWrapper%28%27com%2Eomnigroup%2Eomnigraffle%2Egraffle%27%29%0Aemail%2EfileWrappers%20%3D%20%5BimageWrapper%2C%20documentWrapper%5D%0Aemail%2Egenerate%28%29%7Dcatch%28err%29%7Bconsole%2Elog%28err%29%7D
mail-logo-file
UNDER CONSTRUCTION

This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.

DISCLAIMER