Is it possible to receive inbound emails using Mandrill?

Solution 1:

Yes, it's possible to receive emails using Mandrill. I've recently set up something similar, although more like a reverse case of what you want:

  1. First I set up Mandrill to send email from [email protected] Setting up sending domain.
  2. Next I set up the same domain for inbound emails Inbound email processing.
  3. I created a webhook on our server to process events from Mandrill, it looks something like this:

    (defn forward-email
      [request]
      (doseq [event (get-inbound-events request)]
        (let [email {:to "[email protected]"
                     :from-address "[email protected]"
                     :from-display (get-in event [:msg :from_name])
                     :reply-to (get-in event [:msg :from_email])
                     :subject (get-in event [:msg :subject])
                     :body (get-in event [:msg :text])}]
          (send-email email))))
    

    I'm not sure how versed you are in Clojure, but the basic gist is that you extract the information from the request (use Webhook structure for reference) and forward it to another email address using the SMTP from step 1. It's important to note that you are not sending it on behalf of someone else, you are just setting their address as a "Reply To".

  4. In my case [email protected] is a Google Apps address, so I just use Gmail as my inbox

  5. Finally, I added [email protected] as my sending address in Gmail

So I send all emails from [email protected], but receive all emails on [email protected]. The advantage is that I'm not limited by the Gmail sending quota, but can still use Gmail to manage the emails.

You can also use Desk with this set up really easily, and it will even automatically recognise "Reply To" in the header and send an auto-acknowledgement, even if it was forwarded from Mandrill. You will need to set it to poll from [email protected] and send from [email protected] as well.