Today Mailtrain got support for attaching files for campaigns. To add new attachments click on the “Edit Campaign” button and once in the edit view you should see a new tab “Attachments”. On that page you can upload, view and delete attached files.
Once you send out the campaign, all listed files are added as normal attachments to the messages.
Be aware that Mailtrain has maximum POST body defined in the configuration file (postsize option) that defaults to 2 MB. If your attachment is larger than the allowed post size, then the upload will fail.
Summer is almost over and it’s time to provide Mailtrain, the self hosted newsletter app, some new features.
Mailtrain is now able to use centrally managed LDAP for user handling. This allows you to log in with the same credentials you use in other parts of your stack. Mailtrain has always been able to support multiple users but so far there has been no front-end to add and manage accounts and manually adding rows to MySQL database is not something most people are willing to do. LDAP is probably not too popular among smaller teams either and it is quite a handful to set up so one fine day there is going to be user management built directly into Mailtrain but that day is not arrived yet.
JSON data fields
One neat new feature is JSON data field. You can add a custom field to a list using the JSON datatype. It seems like a normal textarea but it expects JSON data instead of plain text. Whatever is stored in this field is rendered using a Handlebars template. This means that it is finally possible to use conditionals in Mailtrain newsletters. The downside is that the data inside JSON is not indexed, for example you can’t use it to build Segments. You can’t use the values throughout the message as well, the JSON data is only available inside the Handlebars template.
Here’s an example of such data field. As you can see you define that this is JSON data and you can also provide a template for rendering this data.
And here’s how you set the data for a subscriber. It’s a regular JSON string, use whatever schema you like to, no restrictions (beside the length of the data, no text field can be longer than 64kB). You can update this also by using the Mailtrain API (for the API it’s seems like a regular text field) or CSV import even though passing JSON through CSV seems strange at least.
And putting it all together, this is how a message looks like that includes the rendered JSON value
You can read all about the new JSON data type from the Mailtrain Wiki here.
As you might remember then I ran a crowdfunding campaign through May and June. The campaign is now ended and the resulting updates are available for anyone to download. Huge props for all the backers! Thanks to the campaign Mailtrain now has support for trigger-based automation that enables any kind of autoresponders and drip campaigns. You can read about setting up the triggers from the Mailtrain Wiki.
In short, you can define rules like X days after a subscriber opened campaign Y send campaign Z or X days after subscriber signed up send campaign Y that constantly monitor subscribers and if a subscriber hits a trigger the resulting campaign is sent to his/her address. You can set up as many triggers you want and these can be chained as well. For example, you send out a campaign 1 day after signup and the next campaign 2 days after the subscriber opened the first one. Or send a different campaign if the subscriber did not open the first one.
To make things even more interesting you can combine different features in Mailtrain:
Add a custom date field “Subscription Expires” to your subscribers’ list
Whenever a new user signs up to your service use Mailtrain API to add this user to your list together with the expiration date for the custom field
Create a triggered campaign “Your subscription for my service ends in 3 days”
Create a trigger that fires “-3” days after the expiration date field value (it means is that the trigger fires 3 days before the date value in the custom expiration date field)
But hey, that’s not all!
I have also fixed several bugs, for example, a bug with segmentation rules where using condition ANY resulted listing all subscribers of the list. You can also use throttling when sending out campaigns if your SMTP provider requires you to send slower than some specific sending speed. And finally, there’s now an option to turn off automatic list subscription and unsubscription notifications.
After few bugfix updates there’s again a new feature available for Mailtrain users. This update brings message previews, so you can see how a message looks like before actually sending it. This comes really handy if you want to use complex merge tags etc.
You can find out all the details about message previews from the Wiki
Open ended range selector for segments. Instead of marking date range rules from a specific date to specific date you can leave one of the dates unfilled. Usefule when creating segments like “anyone who signed up after DATEVALUE”
List subscribers who clicked, opened, unsubscribed or bounced. Additionally you can list all subscribers who clicked a specific link.