So, you have a product or service that needs to send emails or text messages, and you have a reliable provider like Mailgun or Twilio.
Great — you’re good to go, right?
Well, no. First you’ll need some kind of template system. But where do you store the templates? And how do you test them with real data? Or make edits and preview the result? You’ll also need to hook up the templates to your provider, create plain-text versions of your HTML emails, make sure everything is secure, come up with a way to view sent messages in a browser ...
... on and on it goes. Then you’ll have to repeat all of it for every project!
Outkit solves all of these problems and more, with a specific focus on reuse in multiple projects or products.
const Outkit = require('@outkit/outkit');
const client = new Outkit.Client({
key: '', // Fill in your API key
secret: '', // Fill in your API secret
passphrase: '', // Fill in your API passphrase (not your personal password)
});
// Construct a message record
const messageRecord = {
type: 'email', // Message type - 'email' and 'sms' currently supported
project: 'my-project', // Project identifier
template: 'my-welcome', // Template identifier
subject: 'Welcome, Jane!', // Email subject (optional)
to: 'some.name@example.com', // Recipient address (and optional name)
from: 'other.name@example.com', // Sender address (and optional name)
data: {
name: 'John Doe',
// ...
// Add the values for any variables used in the template here
},
};
// Then submit it
const message = await client.createMessage(messageRecord);
// Use autolading to be able to use our classes without explicitly requiring them
require __DIR__ . '/vendor/autoload.php';
// Instantiate a client by supplying API credentials
$client = new Outkit\Client(array(
"key" => "", // Fill in your API key
"secret" => "", // Fill in your API secret
"passphrase" => "" // Fill in your API passphrase (not your personal password)
));
// Construct a message record
$messageRecord = array(
"type" => "email", // Message type - 'email' and 'sms' currently supported
"project" => "my-project", // Project identifier
"subject" => "Welcome, Jane!", // Email subject (optional, can also be set in the template or omitted for SMS messages)
"template" => "my-template", // Template identifier
"to" => "some.name@example.com", // Recipient address (and optional name)
"from" => "other.name@example.com", // Sender address (and optional name)
"data" => array(
"name" => "John Doe",
// ...
// Add the values for any variables used in the template here
),
);
// Then submit it
$message = $client->createMessage($messageRecord);
# Configure Outkit in your config files
config :outkit,
key: "OUTKIT_API_KEY",
secret: "OUTKIT_API_SECRET",
passphrase: "OUTKIT_API_PASSPHRASE"
###
# Create a message
{:ok, message} = Outkit.Message.create(%{
type: "email", # Message type - 'email' and 'sms' currently supported
project: "my-project", # Outkit project identifier (managed through our web UI)
template: "my-template", # Template identifier (managed through our web UI)
subject: "Welcome, Jane!", # Email subject (optional, can also be set in the template or omitted for SMS messages)
to: "some.name@example.com", # Recipient address (and optional name)
from: "other.name@example.com", # Sender address (and optional name)
data: %{
name: "John Doe",
# ...
# Add the values for any variables used in the template here
},
})
Sending a message is just an API call away. You specify which template to use, supply the locals, and a recipient. We have dead-simple API clients for the most popular languages, with more on the way.
Our pricing model lets you set up messaging for as many projects as you want, without paying a cent before one of them reaches a meaningful volume.
Setting up a robust messaging infrastructure is tedious and difficult. And creating essentially the same templates for many different projects is a huge waste of time that lowers developer happiness. Avoiding this repetition was the initial problem that Outkit set out to solve.
In our solution, inheritance is the key word: A project inherits from its team, and a template inherits from its project. This applies both to data (URLs, email addresses and so on), the actual template contents, and CSS/styling.
Getting a new template up and running can be as simple as changing a few lines of HTML - the rest is inherited.
Can’t read the email? View in browser
You’ve joined the new Acme Service team. Here are your account details:
We’ll soon send you a few tips on how to get the most out of Acme Service. . We’re glad you’re here!
Want to learn more?
Check out the guides on our support site.
It looks like someone submitted a request to reset your Acme Service password. If it wasn’t you there's nothing to do or worry about. You can safely ignore this email.
If this was you, follow the link below to reset your password – we’ll get you back into your account in no time.
John (john@example.com) has invited you to join Startup Inc. on Acme Service. Join now to start collaborating!
We have recorded a login to your Acme Service account with the following details:
Time | Fri, 07 Jul 2017 18:40:14 GMT |
IP Address | 82.26.195.237 |
Browser | Chrome 59.0.3071.115, Mac OS |
Country | SE |
If this was not you, please change your password and contact us immediately by replying to this message.
Heads up! Your Acme Service password was changed on Fri, 07 Jul 2017 18:40:14 GMT.
If this was done by you then there's nothing to do or worry about.
However, if you were unaware of this change, please contact us if you need help or have questions.
Outkit lets you treat multiple messaging protocols - Email and SMS for now - as one. One simple, unified API is all you’ll have to deal with, and we’ll take care of the rest.
When it makes sense to support another message type, we’ll be ready - and so will you! Every part of Outkit has been designed to support multiple message types.
Outkit lets you follow the flow of your messages in real-time. And whether there is a problem or not, you can inspect individual messages, and even see exactly what the provider response was - right down to the HTTP headers and status code.
You don’t have to start from scratch when creating an Outkit template. Choose from an ever-growing list of pre-defined templates, where we have done all the hard work. All you have to do is tweak a few links, edit a text here and there, and maybe replace the logo image.
Different projects have different needs. Outkit supports three different workflows when it comes to generating the content of a message:
After we render your message with the data that you provide, we hand it off to your provider of choice. They handle all the low-level details of email delivery. You can configure any number of providers in Outkit, and switch between them with a couple of clicks – or per API call.
By providing this abstraction layer, Outkit lets you switch between different providers without a single change to your application code or your templates. It also means that your carefully maintained email/SMS reputation won’t be affected by using Outkit, and you can continue to rely on the features you love about your favorite provider.
We have tried to address the main features of Outkit in some detail, but there’s much more we’d like to talk about.
All provider configurations are stored encrypted in our database.
Search every message, see exactly what was sent.
Get a day-by-day breakdown of messages sent per template / provider / project.
Emails can be viewed in the browser by adding a simple tag.