Skip to content
objectivehtml edited this page Dec 10, 2014 · 7 revisions

Overview

To get started using Postmaster, you need to create a new parcel. A parcel is way to send users email when content is creates, updated, deleted, or other entry specific events. So from the main Postmaster screen click Create Parcel

screen shot 2014-12-08 at 2 40 56 am

Creating your first parcel

The first thing you'll want to do is give your parcel a title. This is a unique word or phrase that helps your identify what this parcel is and with whom it's communicating. The next thing you'll notice is Parcel Type. This option allows you to override the default parcel type to do custom things. Developers can create their own parcel types, but this guide only covers how to use the default parcel type, the Email Parcel.

screen shot 2014-12-08 at 2 41 27 am

Continue down the page and start configuring your email options. Any option in the form can be static or dynamic using the Twig template engine. Anything you can do in regular templates you can do in these fields. You entry variable is already available for you and will represent the current entry that is being saved.

screen shot 2014-12-08 at 2 42 11 am

Now that you have defined who is receiving the emails, you need to define the templates. You get two templates, one for HTML content and another for plain text. Simply enter the paths of your templates and they will be used for parsing the message contents.

screen shot 2014-12-08 at 2 42 56 am

Validation

The first validation rule is Events. This tells the system when to attempt to send the email.

screen shot 2014-12-08 at 2 43 10 am

Once you have your events configured, it's time to start thinking about when your email is going to send. You have quite a few options. If any of the conditionals fail to validate, the email will not get sent. The first validation rule is Triggers. You can define if new and/or edited entries should fire an email.

screen shot 2014-12-08 at 2 43 04 am

The third validation rule is Sections. This allows you to limit which sections will used to send the email. If the entry does not belong in one of the defined sections, it will not send.

screen shot 2014-12-08 at 2 43 14 am

The fourth validation rule is Statuses. If the entry does have one of the defined statuses it will not send. If no statuses are defined, this rule will be ignored.

screen shot 2014-12-08 at 2 43 20 am

The last validation rule is Extra Conditionals. This field allows you to define arbitrary logic using the Twig template engine. If the field contents is parsed and returns FALSE, the email will not send.

screen shot 2014-12-08 at 2 43 24 am

Services

Once you have all your parcel validation rules configured, the last thing to do is set the service. The service is what actually sends the email. In some cases, the services don't send emails at all. For example, a service could send an HTTP request or an SMS text message. It's really up to the implementation of each service to determine what it can do. This guide focusses on the Craft service. Use it and it will send email using your system configuration.

screen shot 2014-12-08 at 2 43 37 am