12.10.06

Integral Mailer

by Ben Myles

Integral Mailer is a Ruby on Rails plugin that lets you send email to remote hosts without the aid of
a full-blown MTA like Sendmail. It works by doing a lookup of the
MX server for the destination email and delivering the message directly
to that mail server.

At the moment, you’ll require a unix environment with the ‘dig’ command
available. Without this, the whole thing will fail miserably.
Thanks to Dan Kubb we’re now using the resolv library to do our MX lookups, removing the dependency on the ‘dig’ tool. This
should
make Integral Mailer cross-platform.

Right now it’s experimental, and probably more useful in a
development environment. However, if you use it in production please
be sure to let me know of your success (or lack thereof).

Installation

./script/plugin install http://svn.integralserver.com/plugins/integral_mailer

Configuration

The goal was to keep the configuration as simple as possible. You
can start sending mail by adding one line to environment.rb:

config.action_mailer.delivery_method = :integral_mailer

However, you should probably also add a second line which sets
the value for the “HELO” command when connecting to the remote
SMTP host. The value should be your domain name.

config.action_mailer.server_settings = { :helo => 'foo.com' }

Reverse DNS

This isn’t specific to Integral Mailer, but you should also make sure you have reverse DNS setup properly for the IP address you’re running this on. Otherwise, some mail servers will refuse to accept your mail (or give you a high spam score). Setting up reverse DNS usually involves sending an email request to your hosting provider.

Comments

There are no comments.

Leave a Comment