Code Monkey home page Code Monkey logo

mandrill-rails's Introduction

Mandrill::Rails

travis

The primary goal of Mandrill::Rails is to make supporting Mandrill web hooks as easy and Rails-native as possible. As other opportunities for better Rails integration of the Mandrill API are discovered, these may be rolled in too.

I thought about implementing this as an engine, but the overhead did not seem appropriate. Maybe that view will change..

Mandrill::Rails currently does not need or require any direct Mandrill API integration, such as provided by various Mandrill and MailChimp gems. If you need direct API integration in addition to Mandrill::Rails features, you can choose to add whichever best meets your needs.

FYI, Mandrill is the transactional email service by the same folks who do MailChimp.

Requirements and Known Limitations

Mandrill::Rails 1.5.0+ only supports Rails 5 and MRI 2.2.2+.

For Rails >= 3.0.3, use Mandrill::Rails 1.4.1.

The Mandrill::Rails Cookbook

How do I install it for normal use?

Add this line to your application's Gemfile:

gem 'mandrill-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mandrill-rails

How do I install it for gem development?

If you want to work on enhancements or fix bugs in Mandrill::Rails, fork and clone the github repository. If you are using bundler (recommended), run bundle to install development dependencies.

Run tests using rake or rake spec, and note that guard is also included with the development dependencies so you can kick-off continuous testing of changed files by running bundle exec guard.

See the section below on 'Contributing to Mandrill::Rails' for more information.

How do I configure my app for incoming Mandrill WebHooks?

Say we have configured Mandrill to send requests to /inbox at our site (see the next recipes for how you do that).

Once we have Mandrill::Rails in our project, we just need to do two things. You can run a generator to do it for you, or you can configure things manually:

Using the generator

Run the generator and specify the name for your route and controller:

rails generate mandrill inbox

This will create a resource route and corresponding controller at /inbox.

If you need a namespaced controller, specify it in the name:

rails generate mandrill hooks/inbox

This creates an inbox route that points to the Hooks:InboxController class.

If you prefer pluralized names, that can be specified with a flag:

rails generate mandrill inbox --pluralize_names

This will create an InboxesController class and a resource route called inboxes.

Manual configuration

First, configure a resource route:

resource :inbox, :controller => 'inbox', :only => [:show,:create]

Next, create the corresponding controller:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor
end

That's all for the basic do-nothing endpoint setup. Note that we need both the GET and POST routes (Mandrill sends data to the POST route, but it uses GET to test the availability of the endpoint).

You can setup as many of these controllers as you need, if you wish different types of events to be handled by different routes.

How do I configure Mandrill to send inbound email to my app?

See Mandrill Inbound Domains

  • enter the mail route you want to match on e.g. *@app.mydomain.com
  • set the WebHook enpoint to match e.g. http://mydomain.com/inbox

How do I configure Mandrill to send WebHook requests to my app?

See Mandrill WebHooks

How do I handle specific Mandrill event payloads in my app?

Once we have configured Mandrill and setup our routes and controllers, our app will successfully receive WebHook event notifications from Mandrill. But we are not doing anything with the payload yet.

To handle specific Mandrill event payloads, we just need to implement a handler for each event type we are interested in.

The list of available event types includes: inbound, send, hard_bounce, soft_bounce, open, click, spam, unsub, and reject.

In our controller, we simply write a method called handle_<event-type> and it will be called for each event payload received. The event payload will be passed to this method as a Mandrill::WebHook::EventDecorator - basically a Hash with some additional methods to help extract payload-specific elements.

For example, to handle inbound email:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor

  def handle_inbound(event_payload)
    Item.save_inbound_mail(event_payload)
  end

end

If the handling of the payload may be time-consuming, you could throw it onto a background queue at this point instead.

Note that Mandrill may send multiple event payloads in a single request, but you don't need to worry about that. Each event payload will be unpacked from the request and dispatched to your handler individually.

Do I need to handle all the event payloads that Mandrill send?

No. It is optional. If you don't care to handle a specific payload type - then just don't implement the associated handler method.

For example, your code in production only has a handle_inbound method, but you turn on click webhooks. What should happen?

By default, click events will simply be ignored and logged (as errors) in the Rails log.

You can change this behaviour. To completely ignore unhandled events (not even logging), add the ignore_unhandled_events! directive to your controller:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor
  ignore_unhandled_events!
end

At the other extreme, if you want unhandled events to raise a hard exception, add the unhandled_events_raise_exceptions! directive to your controller:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor
  unhandled_events_raise_exceptions!
end

How can I authenticate Mandrill Webhooks?

Mandrill now supports {webhook authentication}[http://help.mandrill.com/entries/23704122-Authenticating-webhook-requests] which can help prevent unauthorised posting to your webhook handlers. You can lookup and reset your API keys on the {Mandrill WebHook settings}[https://mandrillapp.com/settings/webhooks] page.

If you do not configure your webhook API key, then the handlers will continue to work fine - they just won't be authenticated.

To enable authentication, use the authenticate_with_mandrill_keys! method to set your API key. It is recommended you pull your API keys from environment settings, or use some other means to avoid committing the API keys in your source code.

For example, to handle inbound email:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor
  authenticate_with_mandrill_keys! 'YOUR_MANDRILL_WEBHOOK_KEY'

  def handle_inbound(event_payload)
    # .. handler methods will only be called if authentication has succeeded.
  end

end

How can I authenticate multiple Mandrill Webhooks in the same controller?

Sometimes you may have more than one WebHook sending requests to a single controller, for example if you have one handling 'click' events, and another sending inbound email. Mandrill assigns separate API keys to each of these.

In this case, just add all the valid API keys you will allow with authenticate_with_mandrill_keys!, for example:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor
  authenticate_with_mandrill_keys! 'MANDRILL_CLICK_WEBHOOK_KEY', 'MANDRILL_INBOUND_WEBHOOK_KEY', 'ANOTHER_WEBHOOK_KEY'

  def handle_inbound(event_payload)
  end

  def handle_click(event_payload)
  end

end

How do I pull apart the event_payload?

The event_payload object passed to our handler represents a single event and is packaged as an Mandrill::WebHook::EventDecorator - basically a Hash with some additional methods to help extract payload-specific elements.

You can use it as a Hash (with String keys) to access all of the native elements of the specific event, for example:

event_payload['event']
=> "click"
event_payload['ts']
=> 1350377135
event_payload['msg']
=> {...}

If you would like examples of the actual data structures sent by Mandrill for different event types, some are included in the project source under spec/fixtures/webhook_examples.

What additional methods does event_payload provide to help extract payload-specific elements?

In addition to providing full Hash-like access to the raw message, the event_payload object (a Mandrill::WebHook::EventDecorator) provides a range of helper methods for some of the more obvious things you might need to do with the payload. Here are some examples (see {Mandrill::WebHook::EventDecorator class documentation}[http://rubydoc.info/gems/mandrill-rails/Mandrill/WebHook/EventDecorator] for full details)

event_payload.message_id
# Returns the message_id.
# Inbound events: references 'Message-Id' header.
# Send/Open/Click events: references '_id' message attribute.

event_payload.user_email
# Returns the subject user email address.
# Inbound messages: references 'email' message attribute (represents the sender).
# Send/Open/Click messages: references 'email' message attribute (represents the recipient).

event_payload.references
# Returns an array of reference IDs.
# Applicable events: inbound

event_payload.recipients
# Returns an array of all unique recipients (to/cc)
#   [ [email,name], [email,name], .. ]
# Applicable events: inbound

event_payload.recipient_emails
# Returns an array of all unique recipient emails (to/cc)
#   [ email, email, .. ]
# Applicable events: inbound

How to extend Mandrill::WebHook::EventDecorator for application-specific payload handling?

It's likely you may benefit from adding more application-specific intelligence to the event_payload object.

There are many ways to do this, but it is quite legitimate to reopen the EventDecorator class and add your own methods if you wish.

For example event_payload.user_email returns the subject user email address, but perhaps I will commonly want to match that with a user record in my system. Or I similarly want to resolve event_payload.recipient_emails to user records. In this case, I could extend EventDecorator in my app like this:

# Extends Mandrill::WebHook::EventDecorator with app-specific event payload transformation
class Mandrill::WebHook::EventDecorator

  # Returns the user record for the subject user (if available)
  def user
    User.where(email: user_email).first
  end

  # Returns user records for all to/cc recipients
  def recipient_users
    User.where(email: recipient_emails)
  end

end

How do I extract attachments from an inbound email?

The EventDecorator class provides an attachments method to access an array of attachments (if any). Each attachment is encapsulated in a class that describes the name, mime type, raw and decoded content.

For example:

def handle_inbound(event_payload)
  if attachments = event_payload.attachments.presence
    # yes, we have at least 1 attachment. Lets look at the first:
    a1 = attachments.first

    a1.name
    # => e.g. 'sample.pdf'
    a1.type
    # => e.g. 'application/pdf'
    a1.base64
    # => true
    a1.content
    # => this is the raw content provided by Mandrill, and may be base64-encoded
    # e.g. 'JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvY ... (etc)'
    a1.decoded_content
    # => this is the content decoded by Mandrill::Rails, ready to be written as a File or whatever
    # e.g. '%PDF-1.3\n%\xC4\xE5 ... (etc)'

  end
end

How do I extract images from an inbound email?

The EventDecorator class provides an images method to access an array of images (if any). Each image is encapsulated in a class that describes the name, mime type, raw and decoded content.

For example:

def handle_inbound(event_payload)
  if images = event_payload.images.presence
    # yes, we have at least 1 image. Lets look at the first:
    a1 = images.first
    a1.name
    # => e.g. 'sample.png'
    a1.type
    # => e.g. 'image/png'
    a1.base64
    # => true # always
    a1.content
    # => this is the raw content provided by Mandrill (always base64)
    # e.g. 'iVBORw0K ... (etc)'
    a1.decoded_content
    # => this is the content decoded by Mandrill::Rails, ready to be written as a File or whatever
    # e.g. '\x89PNG\r\n ... (etc)'
  end
end

How do I use Mandrill API features with Mandrill::Rails?

Mandrill::Rails currently does not need or require any direct Mandrill API integration (such as provided by various {Mandrill}[https://rubygems.org/search?utf8=%E2%9C%93&query=mandrill] and {MailChimp}[https://rubygems.org/search?utf8=%E2%9C%93&query=mailchimp] gems). If you need direct API integration in addition to Mandrill::Rails features, you can choose to add whichever best meets your needs and use as normal.

Contributing to Mandrill::Rails

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the gemspec, Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2012 Paul Gallagher. See LICENSE for further details.

mandrill-rails's People

Contributors

cokesnort avatar klebervirgilio avatar kyleschmolze avatar lime avatar mathijsk93 avatar pikachuexe avatar prosanelli avatar shanna avatar tardate avatar tomdracz avatar zshannon 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  avatar  avatar  avatar

mandrill-rails's Issues

First draft for engine and activerecord

Hello,

I've forked the repo and added "engine and activerecord" support to easily save results from webhooks into the DB. I'd like to get a feedback on the work done so far.

Is there interest to merge this fork into the master branch?
If yes, is there other features that should be added/removed.
I'd like to have feedback to fix things before submitting my work.

Regards,

Jade

https://github.com/jadetr/mandrill-rails.git

right now to save webhooks for open and click events, I just have to mount the engine:
route.rb
mount Mandrill::Engine => "/mandrill", :as => "mandrill"

import and run migration:
rake railties:install:migrations
rake db:migrate

Handling attachments from inbound events

Thanks for your work on this gem, has saved me a ton of time wrangling JSON responses. Do you have working example or a suggestion for how to parse then save the array of (potential) attachments in an inbound webhook post? I'm properly handling the inbound event via handle_inbound(event_payload) but am struggling to get at the attachment array elements.

Thanks,

Jason

Bad email address in bulk emailing

Hi,

I am not sure if this is more of an issue on the gem side or on Mandrill's mail server side.

I tried sending to multiple recipients at once and sometimes it fails with the following exception:

Error Class Net::SMTPServerBusy
Error Message 401 4.1.3 Bad recipient address syntax

In the past this has happened when I have email addresses with bad format, e.g. [email protected] (double dots). Note that I've done regex validation but some addresses just slip past my validation -- that's the reality of regex email validation (See http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address/719543#719543)

When sending emails in bulk, it's not possible for me to find out which email address is bad because I am sending to 1000 recipients in one go.

The sending fails for that whole batch so that even though I have an auto-retry solution (using sidekiq), this batch always keeps failing.

Ideally the gem or Mandril should tell me which of the email addresses is invalid (may be via webhook or using a more explicit exception that can be rescued and processed), so that I can blacklist the offending address. So even though the sending fails the first time, it will work on the next retry because by that time I've blacklisted the bad address.

Thanks

undefined method `original_url' for #<ActionDispatch::Request

HI, I'm getting a very strange error when I send a test from Mandrill - I get a 500 error in my app. Checking the log I can see the correct controller being used and the data coming in from the test, but then get this...

Completed 500 Internal Server Error in 6ms

NoMethodError (undefined method `original_url' for #ActionDispatch::Request:0x007f1060a07ef0):

I've checked the docs and Request seems to have a method original_url in current rails v4 and in my apps rails v3. SO I don't see how this can be happening. Any suggestions?

Help Avoid Authentication Errors from Extraneous Controller Params

I want to lead with thanks for this Gem!

I noticed while working on a project that the Webhook Processor fails to generate the correct signature if there are additional controller params. This was caused by a default 'format' tag inherited in my routes file (<-Totally my bad, but not easy to track down). Is it worthwhile to add format to { 'actions', 'controller' } to avoid this issue or simply whitelist the known good params from mandrill?

handle_inbound not working

As per the documentation I've created an inbox controller:

class InboxController < ApplicationController
  include Mandrill::Rails::WebHookProcessor

  def handle_inbound(event_payload)
    Rails.logger.info event_payload['msg']
    Rails.logger.info "-------------"
    Rails.logger.info event_payload.user_email
    Rails.logger.info "-------------"
    Rails.logger.info event_payload.recipients
    Rails.logger.info "-------------"
    Rails.logger.info event_payload.recipient_emails
  end
end

I've copied the routes for the inbox verbatim from the readme as well. When I send a test email from the mandrill app web interface to an email address I've set up with a hook sending a POST request to mydomain.com/inbox I can see a request hit:

 Processing by InboxController#create as */*

The params include: Parameters: {"mandrill_events" etc.

However I cannot see any of my logging info.

Additionally I've tried to define a create method in the same controller and have the following in the definition:

Mandrill::WebHook::EventDecorator[params[:mandrill_events]]

But then I get ArgumentError: odd number of arguments for Hash

handle_inbound not called from local request

Hi guys,

I am trying to test some inbounds on localhost, and this is what I was thinking:

I use httparty gem, to send a post request to my route, with the json content from spec/fixtures/webhook_examples/inbound_with_multiple_attachaments.json.

This is my code:

class EmailsController < ApplicationController
  include Mandrill::Rails::WebHookProcessor

  def handle_inbound(event_payload)
    binding.pry # I try to stop here, so I can handle the incoming request
  end
end
require 'httparty'
require 'pry'
require 'json'

# Read Json File
json = File.read('mandrill_test/inbound_with_multiple_attachments.json')

# Parse json string to hash
content = JSON.parse(json)

# Send hash as paramenter 
HTTParty.post(
  'http://localhost:3000/emails', 
  body: content[0]
)
resource :emails, :controller => 'emails', :only => [:show,:create]

Pretty straightforward I guess, but for some reason, I'm missing something. Doesn't this request call the handle_income method?

Thanks, Vlad

Please release Rails 5 version

Is this gem completely unsupported? Would be nice to get a Rails-5 ready version, there are lots of forks that do that already

How to identify mandrill webhook

Sorry for not asking a question related to the gem, but I don't have any other solutions :) . Maybe at some point it will help others also .

I have a Rails 4 application which sends emails using Mandrill. I am trying to detect weather a mail was opened or bounced, so I am using webhooks for this. I successfully receive the webhooks, but I can't tell which of them identify a particular email from my database.

I've tried using this

  def send_message(email)

    mail( from: ...,
          to: ...,
          subject: ...)

    headers["X-MC-AutoHtml"] = "true"
    headers["X-MC-Track"] = "opens"
    headers['X-MC-MergeVars'] = { "id" => some_id }.to_json
  end

but I'm not sure if I'm supposed to receive the X-MC-MergeVars back ( this is what I've understand from the docs)

Unfortunately, it's not working.

Do you have any ideas or an alternative solution? Thanks

before_filter :authenticate_user!, only: [:show]

If a user visits, http://mysite.com/inbox, they will get redirected to the signup page. Is that causing the webhook to break as I can't get it working?

class InboxController < ApplicationController
before_filter :authenticate_user!, only: [:show]
include Mandrill::Rails::WebHookProcessor
def handle_inbound(event_payload)

Mandrill::WebHook::EventDecorator class extension not getting loaded

Hi,

I've extended the Mandrill::WebHook::EventDecorator class as described in the documentation by creating a new decorator in decorators > mandrill > webhook > event_decorator.rb in my app.

class Mandrill::WebHook::EventDecorator

  def bounce_details
    [bounce_description, bounce_diagnosis].reject(&:blank?).join('. ')
  end

  def bounce_description
    self['msg']['bounce_description'] if self['msg'] && self['msg']['bounce_description']
  end

  def bounce_diagnosis
    self['msg']['diag'] if self['msg'] && self['msg']['diag']
  end
end

My app receives requests for Mandrill fine and then starts a Delayed::Job method which process the payload.

However, when this delayed job is run I get an error:

Job Class#delayed_create_without_delay (id=2048) FAILED (0 prior attempts) with NoMethodError: undefined method `bounce_details' for #<Mandrill::WebHook::EventDecorator:0x007f64b642f988>

It seems like the my class extension is getting loaded properly. Any ideas?

authenticate_with_webhook_key fails for app enforcing HTTPS through Cloudflare's Flexible SSL

There's quite a few variables that need to coincide for the issue to surface:

  1. App hosted on Heroku without SSL enabled.
  2. A Rack middleware in the app that redirects all request to app-name.herokuapp.com -> https://www.app-name.com
  3. The https://www.app-name.com is set up through Cloudflare's Flexible SSL (traffic from the internet to Cloudflare goes over SSL but traffic from Cloudflare to Heroku goes in plain HTTP).

In the given set up the authenticate_with_webhook_key filter always fails as the request.original_url used to calculate the expected signature gives the http://... URL while Mandrill sends requests to https://... URL.

For now I solved the issue by writing a replacement for the authenticate_with_webhook_key method that passes the 'correct' URL to Mandrill::WebHook::Processor.authentic?().

Also if someone doesn't mind his app being accessible through *.herokuapp.com URL, he could point the webhook to that URL and it would work fine.

Question about processing the payload

I'm currently processing the payload via background processing (such as delayedjobs) even though the processing is very minimal. Is this the right way to go about it?

Also, what happens if there are many events coming from Mandrill? Is it smarter to batch the events to process them multiple at a time? If so, would love a few pointers.

undefined ignore_unhandled_events!

Hello, i got this error on Heroku app.

Unable to load application: NoMethodError: undefined method ignore_unhandled_events! for InboxController:Class on starting or restarting the app.

its work if i commend out that method, can help me to solve this?

Ruby 2.2.0
Ruby on Rails 4.2.1

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

undefined method `from_email' for #<Mandrill::WebHook::EventDecorator:0x00000007627738>

Exception backtrace

/app/vendor/bundle/ruby/1.9.1/gems/mandrill-rails-1.0.0/lib/mandrill/web_hook/processor.rb:25:in `block in run!'
/app/vendor/bundle/ruby/1.9.1/gems/mandrill-rails-1.0.0/lib/mandrill/web_hook/processor.rb:21:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/mandrill-rails-1.0.0/lib/mandrill/web_hook/processor.rb:21:in `run!'
/app/vendor/bundle/ruby/1.9.1/gems/mandrill-rails-1.0.0/lib/mandrill-rails/web_hook_processor.rb:79:in `create'

Webhook Payload (redacted)

  {
    "event": "inbound",
    "ts": 1385559214,
    "msg": {
      "raw_msg": "Received: from xxxx.xxxx.xxxxxxx.net (mail.xxxxx.co.uk [99.99.99.99])\n\tby ip-99-99-99-99 (Postfix) with ESMTP id 122333333\n\tfor <[email protected]>; Wed, 27 Nov 2013 13:33:32 +0000 (UTC)\nReceived: from xxxx.xxxx.xxxx.net (localhost.localdomain [127.0.0.1])\n\tby localhost (Email Security Appliance) with SMTP id F3EE6101E628_295E809B\n\tfor <[email protected]>; Wed, 27 Nov 2013 12:39:37 +0000 (GMT)\nReceived: from xxxx.xxxx.co.uk (unknown [53.247.144.158])\n\tby xxxx.xxxx.xxxx.net (Sophos Email Appliance) with ESMTP id E041E10CAFD0_295E809F\n\tfor <[email protected]>; Wed, 27 Nov 2013 12:39:37 +0000 (GMT)\nImportance: Normal\nX-Priority: 3 (Normal)\nIn-Reply-To: <5295e0a55ab73_29e0ebc103b1@4830b3e0-2675-41d3-8df8-dc78e0a45544.mail>\nReferences: <5295e0a55ab73_29e0ebc103b1@4830b3e0-2675-41d3-8df8-dc78e0a45544.mail>\nSubject: Re: Leeroy, you have a question from Toni about offer 88206\nMIME-Version: 1.0\nFrom: [email protected]\nTo: <[email protected]>\nCc: [email protected]\nMessage-ID: <OFA804C4DE.C8619FB4-ON80257C30.004A7A89-80257C30.004A7A94@xxxx.co.uk>\nDate: Wed, 27 Nov 2013 13:33:30 +0000\nX-Mailer: Lotus Domino Web Server Release 8.5.3FP4 March 27, 2013\nX-MIMETrack: Serialize by HTTP Server on sde184notes5\/DCUKDECERT(Release 8.5.3FP4|March\n 27, 2013) at 11\/27\/2013 01:33:30 PM,\n\tSerialize complete at 11\/27\/2013 01:33:30 PM,\n\tItemize by HTTP Server on sde184notes5\/DCUKDECERT(Release 8.5.3FP4|March 27, 2013) at\n 11\/27\/2013 01:33:30 PM,\n\tSerialize by Router on sde184notes5\/DCUKDECERT(Release 8.5.3FP4|March 27, 2013) at\n 11\/27\/2013 01:33:31 PM,\n\tSerialize complete at 11\/27\/2013 01:33:31 PM\nX-KeepSent: A804C4DE:C8619FB4-80257C30:004A7A89;\n type=4; name=$KeepSent\nContent-Transfer-Encoding: quoted-printable\nContent-Type: text\/html;\n\tcharset=ISO-8859-1\n\n<FONT face=3D\"Default Sans Serif,Verdana,Arial,Helvetica,sans-serif\" size=\n=3D2>\n<DIV>Hi Toni,<\/DIV><DIV>&nbsp;<\/DIV><DIV>This is James, the sales manager u=\nsing Leeroy's account! Leeroy has had to run off as his wife is giving birt=\nh!<\/DIV>\n<DIV>&nbsp;<\/DIV><DIV>Can you tell me the model of interest, and your annua=\nl mileage and target payment, we can buildd a deal for you.<\/DIV>\n<DIV>&nbsp;<\/DIV><DIV>Kind regards<BR><\/DIV><DIV>James (on Leeroy's mail!)<=\nBR>\n<BR>Kind regards<BR><BR>Leeroy xxxx<BR>A>\n<BR><BR>xxxx Group<BR>xxxxs a trading name of and Hamp=\nshire Limited. BR>\n<BR>This e-mail is confidential and may also be privileged. If you are not =\nthe..<BR>\n<DIV><BR><\/DIV><FONT color=3D#990099>-----&lt;[email protected]&gt; =\nwrote: -----<BR>\n<BR><\/FONT><BLOCKQUOTE style=3D\"BORDER-LEFT: #000000 2px solid; PADDING-LEF=\nT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px\">\nTo: Leeroy xxxx &lt;[email protected]&gt;<BR>From: &lt;offer-8=\[email protected]&gt;<BR>\nSent by: &lt;[email protected]&gt;<BR>Date: 11\/27\/2013 12:10PM<BR>\nSubject: Leeroy, you have a question from Toni  about offer 88206<=\nBR>\n<BR><CENTER><TABLE style=3D\"PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #f4f4f4;=\n MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; BORDER-CO=\nLLAPSE: collapse; HEIGHT: 100%; PADDING-TOP: 0px; mso-table-lspace: 0pt; ms=\no-table-rspace: 0pt\" id=3DbodyTable border=3D0 cellSpacing=3D0 cellPadding=\n=3D0 width=3D\"100%\" height=3D\"100%\">\n<TBODY><TR><TD style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; m=\nso-table-rspace: 0pt\" vAlign=3Dtop align=3Dmiddle>\n<!-- \/\/ BEGIN PREHEADER --><TABLE style=3D\"BACKGROUND-COLOR: #ffffff; BORDE=\nR-COLLAPSE: collapse; BORDER-BOTTOM-WIDTH: 0px; mso-table-lspace: 0pt; mso-=\ntable-rspace: 0pt\" id=3DtemplatePreheader border=3D0 cellSpacing=3D0 cellPa=\ndding=3D10 width=3D\"100%\">\n<TBODY><TR><TD style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; m=\nso-table-rspace: 0pt\" vAlign=3Dtop align=3Dmiddle>\n<TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table=\n-rspace: 0pt\" border=3D0 cellSpacing=3D0 cellPadding=3D0 width=3D600>\n<TBODY><TR><TD style=3D\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPS=\nE: collapse; FONT-FAMILY: Arial; COLOR: #dddddd; FONT-SIZE: 12px; mso-table=\n-lspace: 0pt; mso-table-rspace: 0pt\" class=3DpreheaderContent vAlign=3Dtop>\n--- WRITE REPLY ABOVE THIS LINE --- <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR>\n<\/TBODY><\/TABLE><!-- END PREHEADER \\\\ --><!-- \/\/ BEGIN TEMPLATE SECTIONS --=\n><TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-tabl=\ne-rspace: 0pt\" border=3D0 cellSpacing=3D0 cellPadding=3D0 width=3D\"100%\">\n<TBODY><TR><TD style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; m=\nso-table-rspace: 0pt\" vAlign=3Dtop align=3Dmiddle>\n<!-- \/\/ BEGIN HEADER --><TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-tabl=\ne-lspace: 0pt; mso-table-rspace: 0pt\" border=3D0 cellSpacing=3D0 cellPaddin=\ng=3D0 width=3D\"100%\">\n<TBODY><TR><TD style=3D\"BACKGROUND-COLOR: #00a4ff; BORDER-COLLAPSE: collaps=\ne; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; mso-table-lspace: 0pt; =\nmso-table-rspace: 0pt\" id=3DtemplateHeader vAlign=3Dtop align=3Dmiddle>\n<TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table=\n-rspace: 0pt\" class=3DtemplateContainer border=3D0 cellSpacing=3D0 cellPadd=\ning=3D0 width=3D600>\n<TBODY><TR><TD style=3D\"TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT:=\n 100%; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-COLLAPSE: collapse; FO=\nNT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 20px; VERTICAL-ALIGN: middle; =\nFONT-WEIGHT: bold; PADDING-TOP: 0px; mso-table-lspace: 0pt; mso-table-rspac=\ne: 0pt\" class=3DheaderContent>\n<A style=3D\"COLOR: #00a4ff; FONT-WEIGHT: normal; TEXT-DECORATION: underline=\n\" href=3D\"http:\/\/mandrillapp.com\/track\/click.php?u=3D9468237&amp;id=3Dc957c=\nf5cc63e442eaed046d71250d452&amp;url=3Dhttp%3A%2F%2Fquotes.xxxx.co.uk&amp;=\nurl=5Fid=3Db934b2af78697032efe57f20affdda2b09fb10ca\" target=3D=5Fblank>\n<IMG style=3D\"LINE-HEIGHT: 150%; BORDER-RIGHT-WIDTH: 0px; OUTLINE-STYLE: no=\nne; MAX-WIDTH: 600px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORD=\nER-LEFT-WIDTH: 0px; TEXT-DECORATION: none\" id=3DheaderImage src=3D\"http:\/\/g=\nallery.mailchimp.com\/d97bdc4f44006e12654e4f1b6\/images\/xxxx=5Fnewsletter=\n=5Fheader=5Fleft=5Faligned.png\" width=3D600 height=3D100 mc:allowtext=3D\"\" =\nmc:allowdesigner=3D\"\" mc:label=3D\"header=5Fimage\">\n<\/A> <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR><\/TBODY><\/TABLE><!-- END HEADER \\\\=\n --><\/TD>\n<\/TR><TR><TD style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso=\n-table-rspace: 0pt\" vAlign=3Dtop align=3Dmiddle>\n<!-- \/\/ BEGIN BODY --><TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-table-=\nlspace: 0pt; mso-table-rspace: 0pt\" border=3D0 cellSpacing=3D0 cellPadding=\n=3D0 width=3D\"100%\">\n<TBODY><TR><TD style=3D\"PADDING-BOTTOM: 20px; BACKGROUND-COLOR: #ffffff; PA=\nDDING-LEFT: 20px; PADDING-RIGHT: 20px; BORDER-COLLAPSE: collapse; BORDER-TO=\nP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-TOP: 20px; mso-table-lspace=\n: 0pt; mso-table-rspace: 0pt\" id=3DtemplateBody vAlign=3Dtop align=3Dmiddle>\n<TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table=\n-rspace: 0pt\" class=3DtemplateContainer border=3D0 cellSpacing=3D0 cellPadd=\ning=3D0 width=3D600>\n<TBODY><TR><TD style=3D\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPS=\nE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 16px; FONT-WEIG=\nHT: 100; PADDING-TOP: 24px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" c=\nlass=3DbodyContent vAlign=3Dtop>\n<P>Hola Leeroy xxxx,<\/P><BR>A xxx user (Offer id: #088206), Toni from Luton, Luton, has sent you a new message about the xxx they =\nrequested offers for: <P>\n<\/P><BLOCKQUOTE style=3D\"PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #eee; PADD=\nING-LEFT: 10px; PADDING-RIGHT: 10px; COLOR: #444; PADDING-TOP: 10px\">\nHi Leeroy Thank you for your email. Can you please send me some blah blah blah Thanks again Toni <\/BLOCKQUOTE>\n<BR>Login to your dashboard to <P><\/P><TABLE style=3D\"BORDER-COLLAPSE: coll=\napse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" width=3D\"100%\">\n<TBODY><TR><TD style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; m=\nso-table-rspace: 0pt\" align=3Dmiddle>\n<TABLE class=3DtemplateButton border=3D0 cellSpacing=3D0 cellPadding=3D20 w=\nidth=3D300>\n<TBODY><TR><TD style=3D\"TEXT-ALIGN: center; LINE-HEIGHT: 100%; BORDER-COLLA=\nPSE: collapse; FONT-FAMILY: Arial; COLOR: #ffffff; FONT-SIZE: 20px; FONT-WE=\nIGHT: 300; TEXT-DECORATION: none; mso-table-lspace: 0pt; mso-table-rspace: =\n0pt\" class=3DtemplateButtonContent vAlign=3Dcenter align=3Dmiddle>\n<A style=3D\"TEXT-ALIGN: center; LINE-HEIGHT: 100%; FONT-FAMILY: Arial; COLO=\nR: #ffffff; FONT-SIZE: 20px; FONT-WEIGHT: 300; TEXT-DECORATION: none\" Respond directly to Toni by replying to this email. Ne=\ned help? Call John, 02020202020. <P>\n<\/P><BR>Regards, <P><\/P><BR>The xxxx team <P><\/P><\/TD><\/TR><\/TBODY><\/TABL=\nE>\n<\/TD><\/TR><\/TBODY><\/TABLE><!-- END BODY \\\\ --><\/TD><\/TR><TR><TD style=3D\"BO=\nRDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" vAli=\ngn=3Dtop align=3Dmiddle>\n<!-- \/\/ BEGIN FOOTER --><TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-tabl=\ne-lspace: 0pt; mso-table-rspace: 0pt\" border=3D0 cellSpacing=3D0 cellPaddin=\ng=3D0 width=3D\"100%\">\n<TBODY><TR><TD style=3D\"PADDING-BOTTOM: 20px; PADDING-LEFT: 20px; PADDING-R=\nIGHT: 20px; BORDER-COLLAPSE: collapse; BORDER-TOP-WIDTH: 0px; PADDING-TOP: =\n20px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" id=3DtemplateFooter vAl=\nign=3Dtop align=3Dmiddle>\n<TABLE style=3D\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table=\n-rspace: 0pt\" class=3DtemplateContainer border=3D0 cellSpacing=3D0 cellPadd=\ning=3D0 width=3D600>\n<TBODY><TR><TD style=3D\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPS=\nE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 10px; mso-table=\n-lspace: 0pt; mso-table-rspace: 0pt\" class=3DfooterContent vAlign=3Dtop col=\nSpan=3D3>\n<A style=3D\"COLOR: #606060; FONT-WEIGHT: 100; TEXT-DECORATION: underline\" h=\nref=3D\"http:\/\/mandrillapp.com\/track\/click.php?u=&amp;id==\nc6&amp;url=3Dhttp%3A%2F%2Ftwitter.com%2F&amp;=\nurl=5Fid=\" target=3D=5Fself>\nFollow on Twitter<\/A>&nbsp;&nbsp;&nbsp;<A style=3D\"COLOR: #606060; FONT-WEI=\nGHT: 100; TEXT-DECORATION: underline\" href=3D\"http:\/\/mandrillapp.com\/track\/=\nclick.php?u=&amp;id=&amp;url=3Dh=\nttp%3A%2F%2Fwww.facebook.com%2F&amp;url=5Fid==\nfc5dadc29bc1e18f56\" target=3D=5Fself>\nLike on Facebook<\/A>&nbsp;<\/TD><\/TR><TR><TD style=3D\"TEXT-ALIGN: left; PADD=\nING-BOTTOM: 20px; LINE-HEIGHT: 150%; BORDER-COLLAPSE: collapse; FONT-FAMILY=\n: Arial; COLOR: #686c70; FONT-SIZE: 10px; PADDING-TOP: 20px; mso-table-lspa=\nce: 0pt; mso-table-rspace: 0pt\" class=3DfooterContent vAlign=3Dtop>\n<EM>Copyright =A9 2013   Ltd, All rights reserved.<\/EM> <BR><BR>\n<\/TD><\/TR><TR><TD style=3D\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLL=\nAPSE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 10px; mso-ta=\nble-lspace: 0pt; mso-table-rspace: 0pt\" class=3DfooterContent vAlign=3Dtop =\ncolSpan=3D3>\n<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;<\/SPAN> <SPAN>&nbsp;&nbsp;&nbsp;&nbsp;<\/SPAN>\n <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR><\/TBODY><\/TABLE><!-- END FOOTER \\\\ -->=\n<\/TD>\n<\/TR><\/TBODY><\/TABLE><!-- END TEMPLATE SECTIONS \\\\ --><\/TD><\/TR><\/TBODY>\n<\/TABLE><\/CENTER><IMG src=3D\"http:\/\/mandrillapp.com\/track\/open.php?u==\n237&id=3Dc95\" width=3D1 height=3D1>\n <BR><\/BLOCKQUOTE><BR><\/DIV><\/FONT>",
      "headers": {
        "Received": [
          "from xxxx.xxx.xxx.net (mail.xxx.co.uk [00.00.00.00]) by ip-00-00-00-00 (Postfix) with ESMTP id 642254A820F for <[email protected]>; Wed, 27 Nov 2013 13:33:32 +0000 (UTC)",
          "from xxxx.xxxx.xxxx.xxxx (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id F3EE6101E628_295E809B for <[email protected]>; Wed, 27 Nov 2013 12:39:37 +0000 (GMT)",
          "from xxxx.xxxx.co.uk (unknown [00.00.00.00]) by xxxx.xxxx.xxxx.net (Sophos Email Appliance) with ESMTP id E041E10CAFD0_295E809F for <[email protected]>; Wed, 27 Nov 2013 12:39:37 +0000 (GMT)"
        ],
        "Importance": "Normal",
        "X-Priority": "3 (Normal)",
        "In-Reply-To": "<5295e0a55ab73_29e0ebc103b1@4830b3e0-2675-41d3-8df8-dc78e0a45544.mail>",
        "References": "<5295e0a55ab73_29e0ebc103b1@4830b3e0-2675-41d3-8df8-dc78e0a45544.mail>",
        "Subject": "Re: Leeroy, you have a question from Toni   about offer 88206",
        "Mime-Version": "1.0",
        "From": "[email protected]",
        "To": "<[email protected]>",
        "Cc": "[email protected]",
        "Message-Id": "<OFA804C4DE.C8619FB4-ON80257C30.004A7A89-80257C30.004A7A94@xxxxx.co.uk>",
        "Date": "Wed, 27 Nov 2013 13:33:30 +0000",
        "X-Mailer": "Lotus Domino Web Server Release 8.5.3FP4 March 27, 2013",
        "X-Mimetrack": "Serialize by HTTP Server on sde184notes5\/DCUKDECERT(Release 8.5.3FP4|March 27, 2013) at 11\/27\/2013 01:33:30 PM, Serialize complete at 11\/27\/2013 01:33:30 PM, Itemize by HTTP Server on sde184notes5\/DCUKDECERT(Release 8.5.3FP4|March 27, 2013) at 11\/27\/2013 01:33:30 PM, Serialize by Router on sde184notes5\/DCUKDECERT(Release 8.5.3FP4|March 27, 2013) at 11\/27\/2013 01:33:31 PM, Serialize complete at 11\/27\/2013 01:33:31 PM",
        "X-Keepsent": "A804C4DE:C8619FB4-80257C30:004A7A89; type=4; name=$KeepSent",
        "Content-Transfer-Encoding": "quoted-printable",
        "Content-Type": "text\/html; charset=ISO-8859-1"
      },
      "html": "<FONT face=\"Default Sans Serif,Verdana,Arial,Helvetica,sans-serif\" size=2>\n<DIV>Hi Toni,<\/DIV><DIV>&nbsp;<\/DIV><DIV>This is James, the sales manager using Leeroy's account! Leeroy has had to run off as his wife is giving birth!<\/DIV>\n<DIV>&nbsp;<\/DIV><DIV>Can you tell me the model of interest, and your annual mileage and target payment, we can buildd a deal for you.<\/DIV>\n<DIV>&nbsp;<\/DIV><DIV>Kind regards<BR><\/DIV><DIV>James (on Leeroy's mail!)<BR>\n<BR>Kind regards<BR>90099>-----&lt;[email protected]&gt; wrote: -----<BR>\n<BR><\/FONT><BLOCKQUOTE style=\"BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px\">\nTo: Leeroy xxxx &lt;[email protected]&gt;<BR>From: &lt;[email protected]&gt;<BR>\nSent by: &lt;[email protected]&gt;<BR>Date: 11\/27\/2013 12:10PM<BR>\nSubject: Leeroy, you have a question from Toni  about offer 88206<BR>\n<BR><CENTER><TABLE style=\"PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; BORDER-COLLAPSE: collapse; HEIGHT: 100%; PADDING-TOP: 0px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" id=bodyTable border=0 cellSpacing=0 cellPadding=0 width=\"100%\" height=\"100%\">\n<TBODY><TR><TD style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" vAlign=top align=middle>\n<!-- \/\/ BEGIN PREHEADER --><TABLE style=\"BACKGROUND-COLOR: #ffffff; BORDER-COLLAPSE: collapse; BORDER-BOTTOM-WIDTH: 0px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" id=templatePreheader border=0 cellSpacing=0 cellPadding=10 width=\"100%\">\n<TBODY><TR><TD style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" vAlign=top align=middle>\n<TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" border=0 cellSpacing=0 cellPadding=0 width=600>\n<TBODY><TR><TD style=\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #dddddd; FONT-SIZE: 12px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=preheaderContent vAlign=top>\n--- WRITE REPLY ABOVE THIS LINE --- <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR>\n<\/TBODY><\/TABLE><!-- END PREHEADER \\\\ --><!-- \/\/ BEGIN TEMPLATE SECTIONS --><TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" border=0 cellSpacing=0 cellPadding=0 width=\"100%\">\n<TBODY><TR><TD style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" vAlign=top align=middle>\n<!-- \/\/ BEGIN HEADER --><TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" border=0 cellSpacing=0 cellPadding=0 width=\"100%\">\n<TBODY><TR><TD style=\"BACKGROUND-COLOR: #00a4ff; BORDER-COLLAPSE: collapse; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" id=templateHeader vAlign=top align=middle>\n<TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=templateContainer border=0 cellSpacing=0 cellPadding=0 width=600>\n<TBODY><TR><TD style=\"TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 100%; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 20px; VERTICAL-ALIGN: middle; FONT-WEIGHT: bold; PADDING-TOP: 0px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=headerContent>\n<A style=\"COLOR: #00a4ff; FONT-WEIGHT: normal; TEXT-DECORATION: underline\" href=\"http:\/\/mandrillapp.com\/track\/click.php?u=9468237&amp;id=c957cf5cc63e442eaed046d71250d452&amp;url=http%3A%2F%2Fquotes.xxxx.co.uk&amp;url_id=b934b2af78697032efe57f20affdda2b09fb10ca\" target=_blank>\n<IMG style=\"LINE-HEIGHT: 150%; BORDER-RIGHT-WIDTH: 0px; OUTLINE-STYLE: none; MAX-WIDTH: 600px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none\" id=headerImage src=\"http:\/\/gallery.mailchimp.com\/d97bdc4f44006e12654e4f1b6\/images\/xxxx.png\" width=600 height=100 mc:allowtext=\"\" mc:allowdesigner=\"\" mc:label=\"header_image\">\n<\/A> <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR><\/TBODY><\/TABLE><!-- END HEADER \\\\ --><\/TD>\n<\/TR><TR><TD style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" vAlign=top align=middle>\n<!-- \/\/ BEGIN BODY --><TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" border=0 cellSpacing=0 cellPadding=0 width=\"100%\">\n<TBODY><TR><TD style=\"PADDING-BOTTOM: 20px; BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 20px; PADDING-RIGHT: 20px; BORDER-COLLAPSE: collapse; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-TOP: 20px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" id=templateBody vAlign=top align=middle>\n<TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=templateContainer border=0 cellSpacing=0 cellPadding=0 width=600>\n<TBODY><TR><TD style=\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 16px; FONT-WEIGHT: 100; PADDING-TOP: 24px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=bodyContent vAlign=top>\n<P>Hola Leeroy xxxx,<\/P><BR>A xxxx user (Offer id: #088206), Toni  from Luton, Luton, has sent you a new message about the xxxx they requested offers for: <P>\n<\/P><BLOCKQUOTE style=\"PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #eee; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; COLOR: #444; PADDING-TOP: 10px\">\nHi Leeroy Thank you for your email. Can you please send me some business lease quotes and\/or PCP quotations as I am looking for this car to be my company car. Thanks again Toni <\/BLOCKQUOTE>\n<BR>Login to your dashboard to <P><\/P><TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" width=\"100%\">\n<TBODY><TR><TD style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" align=middle>\n<TABLE class=templateButton border=0 cellSpacing=0 cellPadding=20 width=300>\n<TBODY><TR><TD style=\"TEXT-ALIGN: center; LINE-HEIGHT: 100%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #ffffff; FONT-SIZE: 20px; FONT-WEIGHT: 300; TEXT-DECORATION: none; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=templateButtonContent vAlign=center align=middle>\n<A style=\"TEXT-ALIGN: center; LINE-HEIGHT: 100%; FONT-FAMILY: Arial; COLOR: #ffffff; FONT-SIZE: 20px; FONT-WEIGHT: 300; TEXT-DECORATION: none\" href=\"http:\/\/mandrillapp.com\/track\/click.php?u=9468237&amp;id=c957cf5cc63e442eaed046d71250d452&amp;url=http%3A%2F%2Fquotes.xxxx.co.uk%2Fdealers%2Foffers%2F88206&amp;url_id=78aafdf8a19763ba7e0967d15e22e4b499d1a2b0\" target=blank>\nSee the details of this lead<\/A> <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR><\/TBODY>\n<\/TABLE><BR><SPAN style=\"COLOR: #2ecc71; FONT-WEIGHT: 500\">NEW FEATURE <\/SPAN>\n&amp;dash; Respond directly to Toni  by replying to this email. Need help? Call John, 02076111065. <P>\n<\/P><BR>Regards, <P><\/P><BR>The xxxx team <P><\/P><\/TD><\/TR><\/TBODY><\/TABLE>\n<\/TD><\/TR><\/TBODY><\/TABLE><!-- END BODY \\\\ --><\/TD><\/TR><TR><TD style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" vAlign=top align=middle>\n<!-- \/\/ BEGIN FOOTER --><TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" border=0 cellSpacing=0 cellPadding=0 width=\"100%\">\n<TBODY><TR><TD style=\"PADDING-BOTTOM: 20px; PADDING-LEFT: 20px; PADDING-RIGHT: 20px; BORDER-COLLAPSE: collapse; BORDER-TOP-WIDTH: 0px; PADDING-TOP: 20px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" id=templateFooter vAlign=top align=middle>\n<TABLE style=\"BORDER-COLLAPSE: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=templateContainer border=0 cellSpacing=0 cellPadding=0 width=600>\n<TBODY><TR><TD style=\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 10px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=footerContent vAlign=top colSpan=3>\n<A style=\"COLOR: #606060; FONT-WEIGHT: 100; TEXT-DECORATION: underline\" href=\"http:\/\/mandrillapp.com\/track\/click.php?u=9468237&amp;id=c957cf5cc63e442eaed046d71250d452&amp;url=http%3A%2F%2Ftwitter.com%2Fxxxx&amp;url_id=35530deb3e3923de4d66154d775dcf7307d15aa1\" target=_self>\nFollow on Twitter<\/A>&nbsp;&nbsp;&nbsp;<A style=\"COLOR: #606060; FONT-WEIGHT: 100; TEXT-DECORATION: underline\" href=\"http:\/\/mandrillapp.com\/track\/click.php?u=9468237&amp;id=c957cf5cc63e442eaed046d71250d452&amp;url=http%3A%2F%2Fwww.facebook.com%2Fxxxx&amp;url_id=a0de7c9d161d1d0f65433dfc5dadc29bc1e18f56\" target=_self>\nLike on Facebook<\/A>&nbsp;<\/TD><\/TR><TR><TD style=\"TEXT-ALIGN: left; PADDING-BOTTOM: 20px; LINE-HEIGHT: 150%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 10px; PADDING-TOP: 20px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=footerContent vAlign=top>\n<EM>Copyright \u00a9 2013 Digital Blurb Ltd, All rights reserved.<\/EM> <BR><BR>\n<\/TD><\/TR><TR><TD style=\"TEXT-ALIGN: left; LINE-HEIGHT: 150%; BORDER-COLLAPSE: collapse; FONT-FAMILY: Arial; COLOR: #686c70; FONT-SIZE: 10px; mso-table-lspace: 0pt; mso-table-rspace: 0pt\" class=footerContent vAlign=top colSpan=3>\n<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;<\/SPAN> <SPAN>&nbsp;&nbsp;&nbsp;&nbsp;<\/SPAN>\n <\/TD><\/TR><\/TBODY><\/TABLE><\/TD><\/TR><\/TBODY><\/TABLE><!-- END FOOTER \\\\ --><\/TD>\n<\/TR><\/TBODY><\/TABLE><!-- END TEMPLATE SECTIONS \\\\ --><\/TD><\/TR><\/TBODY>\n<\/TABLE><\/CENTER><IMG src=\"http:\/\/mandrillapp.com\/track\/open.php?u=9468237&id=c957cf5cc63e442eaed046d71250d452\" width=1 height=1>\n <BR><\/BLOCKQUOTE><BR><\/DIV><\/FONT>",
      "from_email": "[email protected]",
      "to": [
        [
          "[email protected]",
          null
        ]
      ],
      "cc": [
        [
          "[email protected]",
          null
        ]
      ],
      "subject": "Re: Leeroy, you have a question from Toni   about offer 88206",
      "spam_report": {
        "score": 3.1,
        "matched_rules": [
          {
            "name": "URIBL_BLOCKED",
            "score": 0,
            "description": "ADMINISTRATOR NOTICE: The query to URIBL was blocked."
          },
          {
            "name": null,
            "score": 0,
            "description": null
          },
          {
            "name": "more",
            "score": 0,
            "description": "information."
          },
          {
            "name": "xxxxxxxx.co.uk]",
            "score": 0,
            "description": null
          },
          {
            "name": "RCVD_IN_DNSWL_NONE",
            "score": 0,
            "description": "RBL: Sender listed at http:\/\/www.xxxx.org\/, no"
          },
          {
            "name": "listed",
            "score": 0,
            "description": "in list.xxxx.org]"
          },
          {
            "name": "URI_HEX",
            "score": 1.3,
            "description": "URI: URI hostname has long hexadecimal sequence"
          },
          {
            "name": "HTML_MESSAGE",
            "score": 0,
            "description": "BODY: HTML included in message"
          },
          {
            "name": "MIME_HTML_ONLY",
            "score": 1.1,
            "description": "BODY: Message only has text\/html MIME parts"
          },
          {
            "name": "HTML_MIME_NO_HTML_TAG",
            "score": 0.6,
            "description": "HTML-only message, but there is no HTML tag"
          }
        ]
      },
      "dkim": {
        "signed": false,
        "valid": false
      },
      "spf": {
        "result": "none",
        "detail": ""
      },
      "email": "[email protected]",
      "tags": [

      ],
      "sender": null,
      "template": null
    }
  }
]

Generator not working

When trying to run rails g mandrill inbox:

Could not find generator 'mandrill'. Maybe you meant 'mandrill', 'model' or 'mailer'
Run rails generate --help for more options.

Generator shows when I run rails g --help but no dice in getting it to work.

Feature Request - Webhook Generator

+1 for generator to wire up webhooks as setting them up statically from Mandrill webconsole isn't really practical for most environments (production). I wrote one to do this and is pretty simple to add, but very useful.

how to test handle_ controller events in minitest?

We are trying to write a simple controller test for testing handle_ events in the controller, but using standard rails minitest we are unable to call the handle_ actions.

It would be awesome if anybody could point me in the right direction with some template.

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.