Git Product home page Git Product logo

remail's Introduction

Remail is RESTful email for Rails.

Forget configuring SMTP servers and queues, just use Remail. Remail uses Google App Engine to send and receive emails RESTfully.

Remail only support Rails 3.

Google App Engine gives you a free quota of 2000 emails per day or, with the paid version, 7,400,000 emails per day.

Features

  • ActionMailer POSTs emails to your Remail App Engine in order to send them
  • Remail POSTs received emails back to a configurable URL
  • Remail will retry the callback if the endpoint is not available

Setup

  • Configure and deploy the Remail App Engine
  • Install the Remail gem (sudo gem install remail)

Sending email

Configure ActionMailer and Remail:

config.action_mailer.delivery_method = :remail
config.action_mailer.remail_settings = {
  :app_id  => "remail-appname",
  :api_key => "changeme"
}

The sender address of a message must be the email address of an administrator for the Remail App Engine. If you want to send email on behalf of the application but do not want to use a single administrator's personal Google Account as the sender, you can create a new Google Account for the application using any valid email address, then add the new account as an administrator for the application.

Receiving email

First, configure the callback URL in your Remail App Engine.

Then create a email controller, that looks a bit like this (remember to configure the routes):

    class EmailsController < ApplicationController
      skip_before_filter :verify_authenticity_token
      
      def create
        if request.headers["Authorization"] != your_api_key
          return head(:unauthorized)
        end
        UserMailer.receive(params[:email][:raw])
        head :ok
      end
    end

The API key is passed through in the Authorization header, you should definitely validate that.

You might want to add :email to the filter_parameters configuration - you don't want your logs being clogged up with emails.

Your app can receive email at addresses of the following form: [email protected]

Misc

To ensure your email doesn't get caught in spam filters, you should follow the tips in this tutorial I wrote - the important points being setting SPF and MX records.

remail's People

Contributors

biilmann avatar maccman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

remail's Issues

Failed. Response code = 404. Response message = Not Found.

When I try to send an email I get this message with delivery_errors turned on...

Failed.  Response code = 404.  Response message = Not Found.

I had this working, but now, seemingly without reason, I can't even send an email.

Any ideas?

Thanks,

Steve

Can't send mail

I have followed each step but I can't see a new mail when I send one.

This id what I added to my development.rb

config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :remail
config.action_mailer.remail_settings = {
:app_id => "remail-xxxx",
:api_key => "xxxxxxxxxx"
}

I don't see an error message, what do you think might be wrong?
Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.