Product

Weekly product update: Access Mailgun directly through the Rackspace Cloud Control Panel

To make life easier on these developers, Mailgun is now accessible from directly within the Rackspace Cloud Control Panel. Read more...

PUBLISHED ON

PUBLISHED ON

You may remember that Mailgun was acquired by Rackspace back in August of last year. So far, we think the acquisition is going great: we’re still developing on the product as much as ever, we love the Rackspace team, and thanks to our awesome customers, we’re growing really fast (more than doubling our email volume since the acquisition). While the majority of our customers still come from other platforms and hosting solutions, a ton of Rackspace customers have started using Mailgun (thanks guys!). To make life easier on these developers, Mailgun is now accessible from directly within the Rackspace Cloud Control Panel.

Yo dawg, I put Mailgun in your Rackspace control panel

If you’re a Rackspace customer, you can access your Mailgun account directly from the place where you manage your servers, databases, block storage, private networks and everything else.

By default, each Rackspace Cloud account comes with a fresh Mailgun account, but you can also link your existing Mailgun account. To do that, you’ll just need your API key and use the same login email address for both accounts. Pretty simple.

An example: Parsing emails and uploading attachments to Rackspace Cloud Files

A while back we blogged about a really cool photo sharing app that used Mailgun to parse emails that users send with their photos and then upload the files to Cloud Files, Rackspace’s object store (which is based on OpenStack Swift). You can read the full post here, but here’s the gist.

Uploading photos to Cloud Files

After you’ve set up a Route to parse the email and post it to your app, send the attachment off to Cloud Files like so:

import cloudfiles import uuid import os conn = cloudfiles.get_connection(username=hsimpson, api_key='kwyjibo') images = conn.create_container('images') #Create a unique ID for a filename image_attachment = images.create_object('%s%s') % (str(uuid.uuid4()), file_extension) image_attachment.load_from_filename(attachment.filename)

In this case (because this is a photo sharing app), it’s important that everything inside the images container is publicly reachable with a unique URL. After uploading, you can request the public URI from Cloud Files.

image_attachment.public_uri() >>'http://c1234.cdn.cloudfiles.rackspacecloud.com/6a8f43...ab3cb7.jpg'

That’s it. Hope the Rackspace integration makes it a little easier to build email into your app like this. Till next time.

Happy sending,

The Mailgunners

Let's talk email

Learn about our deliverability services

See what you can accomplish with the world's best email delivery platform and experts at your disposal.

Related readings

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