

Show HN: Email Templating API - nbrempel
https://www.sendwithus.com/developers

======
DenisM
In related news, if you're using ASP.NET MVC, there is a way to use the
familiar Razor templating engine to template your emails (or anything else,
really). To do that you just need to install RazorEngine (
[http://razorengine.codeplex.com/](http://razorengine.codeplex.com/) ) - it
exposes Razor in a way that it can be used for things other than rendering
pages.

Here's how I use it right now:

    
    
      string templateFile = HttpContext.Current.Server
        .MapPath("~/App_Data/InviteUser.cshtml");
      string template = System.IO.File.ReadAllText(templateFile);
      var model = new
      {
        inviterName = "A user",
        inviterEmail = inviterEmail,
        manufacturerName = inviterMfr,
        UserId = person.PrimaryEmail,
        UserPassword = person.GeneratedPassword,
      };
      var bodyHtml = RazorEngine.Razor.Parse(template, model);
    
    

And the template:

    
    
      <html>
      <body>
        <p>
            @Model.inviterName (@Model.inviterEmail) 
            @if (Model.manufacturerName != null)
            {
                <span>on behalf of <b>@Model.manufacturerName</b></span>
            }
            is inviting you to explore Mercury Catalog by AmpTab - the best furniture catalog app for the iPad:
        </p>
      [SNIP-SNIP]

~~~
mrmch
That's pretty cool Denis. We don't have an official .Net client yet, but we do
have some solid code samples for our REST API.

In our experience email templates are a little different from regular HTML
templates; things like built-in css inlining, A/B testing, and giving access
to non-technical folks.

~~~
DenisM
I see. The linked page pigeonholes you as a competitor to Razor (or other
similar templating libraries) - none of the other benefits are even mentioned
there. I think it's going to be a problem for you - people jump to conclusions
based on what they see.

~~~
mrmch
You're correct Denis, our developer page purely speaks to the "get templates
out of source code" value prop -- maybe a mistake, but it was something we
were testing today :)

------
niftylettuce
Free: [https://github.com/niftylettuce/node-email-
templates](https://github.com/niftylettuce/node-email-templates)

------
zaius
This is awesome. I have been half assed building an identical product for a
while now, but I just can't stand dealing with html email templates. You will
definitely have me as a customer for my next project. A couple thoughts:

1\. The "with" in your logo is the same color as your links. Since your links
aren't underlined, it makes the "with" look like a link. You should change the
color of one of them.

2\. The error message when I click 'execute command' without changing my email
isn't obvious enough.

3\. I want to see the editor. What is the interface the marketing team will
see? Maybe put the template you are going to send next to that curl box.

4\. Do you have decent html and responsive templates? If so, this is a selling
point on its own.

~~~
mrmch
Thanks for the feedback, and woo +1 future customer :)

Our developers page is really new, so there's definite room for improvement.
1+2 definitely need a look tonight.

3\. The UI here could use work; the template is actually in the horizontal
section ABOVE the curl box ...

You can signup (no cc required) and check the editor out, or just watch our
getting started video (which we need to make more public):
[http://www.youtube.com/watch?v=kQhLeBU9wrs](http://www.youtube.com/watch?v=kQhLeBU9wrs)

4\. Yup, responsive emails included out of the box. We'll be adding more
templates shortly (a lot of requests for this lately!)

------
mrmch
I wanted to highlight our (open source) API clients, covering most languages:
[https://github.com/sendwithus](https://github.com/sendwithus)

Here's all the code required to send an email with our Python client:

    
    
       api.send(email_id='YOUR-EMAIL-ID',
           recipient={'address': 'us@sendwithus.com'})
    

There are more complex examples covering unique senders, cc/bcc, dynamic data,
and attachments, but it's good to get a sense of how much complexity this can
remove from your codebase.

------
christiangenco
I don't mean to trigger a bout of programming depression[1], but I don't see
the value in this.

Is the idea that you can have nontechnical people write the templates, and
your app... gets a list of the templates they've made and sends them out?

What's the benefit of using this over just, you know, writing an erb template?
Or is the value for environment that don't have ActiveMail?

1\.
[https://news.ycombinator.com/item?id=7228491](https://news.ycombinator.com/item?id=7228491)

~~~
zaius
I imagine if your marketing team can write an ERB template, you don't need
this. My current flow - marketing guy sends me an email saying "what does the
1 week follow up email say right now?". I send back the email. He sends back
edits. I commit them and deploy.

~~~
mrmch
Yep, that's the exact workflow we're replacing! Think of the experience for
the marketing guy -- after those changes are committed, how can he measure
what affect they had?

------
_kulte
I'd use this if I could use it with [Amazon
SES]([http://aws.amazon.com/ses/](http://aws.amazon.com/ses/)).

~~~
mrmch
Hi Kulte, we support SES for delivery right now!

------
fraserharris
I take it the point of this to remove templates from your code base? Can you
have custom IDs for the email templates (ex: "welcome_email")?

~~~
mrmch
Allowing email id's to be specified is something we've considered, but for now
static id's we auto generate are simple enough.

We encourage our customers to use a static "mapping", with constants set to
each template id. IE WELCOME_EMAIL = '12345'

------
jrpt
As a customer, SendWithUs has great customer service.

I signed up for SendWithUs and had a problem integrating it with my email
sender. They helped me fix the issue and were really fast to respond. I'd
recommend every startup try out SendWithUs.

I haven't used it for that long yet, so I can't really review the product
itself, but so far it's great.

------
securingsincity
I think this is idea is the perfect middle ground product between what mail
gun offers and what something like constant contact would offer. Developers
and marketers get a ton of features and customization without sacrificing a
ton of development time. Also the "CEO's direct phone number" for the top tier
plan made giggle.

~~~
mrmch
Thanks! Complex products like exact target or constant contact really hinder
development; our hope is to make everyone's lives easier.

------
jbrooksuk
I implemented something similar at the company I work for. It started off with
a dashboard that would allow us to send the Top 20 Hotels each week via email.
Then we started templating a lot of emails. Now I just have a server setup
which accepts all the data and sends you back the generated HTML. It's much
simpler for us that way.

~~~
mrmch
That's pretty impressive! When you really look at it, every company needs this
at some point. It's just a question of if you want to spend the resources/time
building it internally, or if you want to focus on your core product :)

~~~
jbrooksuk
Thanks! It's definitely been worth the time for us. A lot of the code on our
API is from the original project, but setup to allow new templates to be
created etc.

------
nubela
I don't get what sendwithus does. Ok, you do A/B testing, ok, you also do drip
campaigns, but what's the end-goal for this? I know if I want to send
newsletters I use mailchimp. If I'm a developer and I want to send bulk
emails, I will use Mailgun. What does SendWithUs do?

~~~
mrmch
Sendwithus is for your transactional/triggered email you're sending through
Mailgun; a signup or notification email. At a basic level, get your product
email out of your source code, and get the benefits of a dedicated templating
product.

------
truebosko
Love this! I actually wrote a pluggable Django app for work that is basically
doing what this service offers. Been meaning to open source it! This is
motivation to do so :)

~~~
mrmch
Cool Bart, look forward to seeing it! In our experience internal systems can't
compare with the product a dedicated team can build. I've had many
conversations with companies moving away from a poor internal solution.

That being said, huge fan of open source and there's plenty of room for
products and tools in this space :)

~~~
truebosko
Of course! I totally agree. Kudos to your team for releasing an actual
product. I didn't mean to say my tool was just as comparable. It merely gives
me some greedy validation that hey, the tool I built might be useful to
others!

------
JazCE
Missing out on Dotmailer
[http://www.dotmailer.co.uk](http://www.dotmailer.co.uk) integration which
would stop me from using it.

------
gesman
What means "active users?" (in pricing plans)

~~~
mrmch
An active user is someone you've sent an email to in a given month, regardless
of volume. So you could send 10,000 emails to 1,000 unique email addresses and
you're billed for 1,000 customers.

Any suggestions on how to better describe that?

~~~
rtanaka
I'd describe it as an unlimited number of emails that you can send with a
limit of 1000 unique email addresses that you can send to.

~~~
mrmch
Thanks for the suggestions, we'll revise this tonight.

