JacobJans / interspire-aws-bounce

Laravel 5.1 app that manages bounces/complaints from Amazon SES/SNS/SQS and Interspire API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel 5.1 app that manages bounces/complaints from Amazon SES/SNS/SQS and Interspire API

Deployment status from DeployBot

This is a work in progress. The aim is to have a Laravel 5.1 app running in front of Interspire. We uses Amazon SES to process Interspire emails. We have set up Amazon SNS notifications for complaints/bounces. These are pushed to Amazon SQS queues.

The app queries the queues to see if there are any complaints/bounces. If so they are handled with Interspire's API. Bounces will be tagged as Bounced and complaints will be Unbsuscribed and added to the Suppression list in Interspire. See this package for more info : https://github.com/SwissWeb/laravel-interspire

Installation

###To install laravel Just clone this project

$ git clone https://github.com/SwissWeb/interspire-aws-bounce.git

Run composer

$ composer update

Copy .env.example to .env and edit it :

$ cp .env.example .env

###To setup the AWS stuff here are hints : For bounces

  • Create an Amazon SQS queue named ses-bounces-queue.
  • Create an Amazon SNS topic named ses-bounces-topic.
  • Configure the Amazon SNS topic to publish to the SQS queue.
  • Configure Amazon SES to publish bounce notifications using ses-bounces-topic to ses-bounces-queue.

For complaints

  • Create an Amazon SQS queue named ses-complaints-queue.
  • Create an Amazon SNS topic named ses-complaints-topic.
  • Configure the Amazon SNS topic to publish to the SQS queue.
  • Configure Amazon SES to publish complaint notifications using ses-complaints-topic to ses-complaints-queue.

###Usage #####To process bounces : Go to

http://example.com/bounces/process

or run

$ php artisan bounces:process

#####To process complaints : Go to :

http://example.com/complaints/process

or run :

$ php artisan complaints:process

If you run the artisan command, you will get debug outputs. Ex:

Bounces are being processed
-> Amazon SQS pulling message(s)
-> Message(s) received
  - Start handling message(s) received
  - recipient1@example.com not subscribed to any list
  - recipient2@example.com not subscribed to any list
-> Amazon SQS pulling message(s)
Complaints processed. Bybye!

Or an error like :

  [Symfony\Component\HttpKernel\Exception\HttpException]
  COMPLAINTS_SQS_URL is not set in .env file

About

Laravel 5.1 app that manages bounces/complaints from Amazon SES/SNS/SQS and Interspire API


Languages

Language:PHP 98.8%Language:JavaScript 0.6%Language:ApacheConf 0.5%Language:CSS 0.1%