Back to main menu

Product

Native Mailgun integration lets Meteor apps send email for free

We’ve been big fans of Meteor since they launched because it was clear they shared our passion for making developers lives’ easier.

PUBLISHED ON

PUBLISHED ON

We’ve been big fans of Meteor since they launched because it was clear they shared our passion for making developers lives’ easier. That’s why we wanted to make sure we partnered with them to enable transactional email on their platform. When you add the Meteor smart package for email, you gain access to Meteor’s email API for use with any standard SMTP server. Not only that but if you deploy your app using meteor deploy on the Meteor platform (there are thousands already), it AUTOMATICALLY comes with a Mailgun account. No configuration whatsoever is required to start sending app emails that actually get delivered to your user’s inbox.

In case you don’t know already, why should you consider building your next web app on Meteor?

Meteor was built to solve real problems that web app developers face all the time. In Meteor, you write your entire application in JavaScript, both the client part and the server part. You can get an application up and running fast, because you only need to think in one language and one API.

Meteor solves a lot of other hard parts of writing modern, rich web applications. It automatically redraws the screen when underlying data changes, so that you don’t have to write any template redrawing code. It gives you a single, consistent database API on the client and the server. And it includes hot code pushes, so that you can continuously deploy changes to your application without interrupting all your signed-in users. (This is becoming more important now as more and more apps run in the browser rather than in the server.)

How to send emails with Meteor using Mailgun.

At the beginning of this post, we mentioned that Meteor offers a native integration for Mailgun. That means that when you add the email package to your Meteor project and use meteor deploy, you will automatically be able to send up to 300 emails per day through Mailgun without having to create a separate Mailgun account or enter any SMTP credentials. Simply use the email.send function and define the structure of the email (to:, from:, subject:; text: or html:). For example, to send a simple text-only email, you’d could use:

If you want to send an email from the client, instead of the server, this is possible too. You just define a method on the server and call it from the client. This would be useful, for example, if you were building a social app where actions that a user takes in the client should trigger sending an email to other users, similar to the way Facebook allows users to receive email when their friends like or comment a post.

In an actual application, you’d need to be careful to limit the emails that a client could send, to prevent your server from being used as a relay by spammers. By calling email.send method inside a method on the server, you get the ability to easily handle access control and rate limiting for clients.

Sending more than 300 emails per day through Meteor

If you want to send more than 300 emails per day through Meteor, that is possible too and simply requires you to signup for a Mailgun account. We’ll have another post soon describing how that process works and how we envision integrating even more deeply in the future as Meteor moves towards general availability.

What you you like to see in a Mailgun-Meteor integration? Leave your ideas in this blog comments or on Hacker News. We’d love to hear them.

Sign Up

It's easy to get started. And it's free.

See what you can accomplish with the world’s best email delivery platform.

Related readings

Forrester TEI study reveals Sinch Mailgun ROI and outcomes

When an enterprise starts working with Sinch Mailgun, what’s the financial impact that choice has on the business? It’s a good question – but not exactly an easy one to answer...

Read more

How to improve holiday supply chain communication with email

This year, shoppers aren’t the only ones worried about orders arriving on time for the holidays. The 2023 holiday shopping season is packed with global supply chain...

Read more

DigitalChalk leverages Mailgun for transactional email notifications

This post was written and contributed by Jon Wilkinson, Software Engineer at DigitalChalk...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon