jonathanargentiero / mandrill-inbound-outbound-forward-php

PHP library for forwarding emails with Mandrill Inbound / Outbound service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mandrill Inbound to Outbound Forward

 angular-wakanda

This application is written in PHP and gave the user the possibility to:

  1. Receive email on Mandrill Inbound
  2. Forward the email on another email/mailbox (like GMAIL) using Mandrill Outbound

Every email received will consume 1 send slot (being forwarded to the address you specified).

Included

  • config sample with domain example.com
  • composer.json configuration file

Prerequisites

Install

First download the repository and install Mandrill API dependency with composer:

$ git clone https://github.com/jonathanargentiero/mandrill-inbound-outbound-forward-php.git
$ cd mandrill-inbound-outbound-forward-php/
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install

Configure

Edit these configuration files:

  1. Add a valid Mandrill API key in config/settings.php
  2. Configure the receivers email addresses in config/receivers.php

NOTE: A catch-all address is always required and defined with *. You can still use the same configuration file for multiple domains registered on Mandrill (but the catch-all will be the common for all domains).

Run

On Mandrill go to inboud > example.com > routes and create a Route with these information:

When The Receiving Email Address Matches:
*@example.com

Post To URL:
http://mail.example.com/mandrill-inbound-outbound-forward-php/

Then save and press send test. After a while (30 seconds) you will receive a Mandrill sample email on the catch-all you defined in config/receivers.php.

Make a final test sending from your usual mailbox a mail.

Known issues

  • Attachments mechanism should be improved because it's not working in every case.

Documentation

Credits

based on this GIST from Mathias Beugnon

About

PHP library for forwarding emails with Mandrill Inbound / Outbound service


Languages

Language:PHP 100.0%