All Projects → ScullWM → MailHookBundle

ScullWM / MailHookBundle

Licence: MIT license
A bundle to catch API webhook from different mail service

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to MailHookBundle

SlmMail
Send mail from Laminas or Mezzio using external mail services.
Stars: ✭ 107 (+197.22%)
Mutual labels:  mandrill, mailgun, sendgrid, sparkpost
go-mail
📧 A cross platform mail driver for GoLang. Featuring Mailgun, Postal, Postmark, SendGrid, SparkPost & SMTP.
Stars: ✭ 169 (+369.44%)
Mutual labels:  mailgun, sendgrid, sparkpost
wemail
Send Affordable Bulk Email Campaign Through WordPress
Stars: ✭ 19 (-47.22%)
Mutual labels:  mailgun, sendgrid, sparkpost
Airform
Functional HTML forms for Front-End Developers.
Stars: ✭ 307 (+752.78%)
Mutual labels:  mailgun, sendgrid
mailer
Simple Email Sending Client for Mailgun & Sendgrid services in crystal
Stars: ✭ 16 (-55.56%)
Mutual labels:  mailgun, sendgrid
mailcoach-support
Questions and support for Mailcoach
Stars: ✭ 32 (-11.11%)
Mutual labels:  mailgun, sendgrid
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+1919.44%)
Mutual labels:  mailgun, sendgrid
Laravel Mailbox
Catch incoming emails in your Laravel application
Stars: ✭ 783 (+2075%)
Mutual labels:  mailgun, sendgrid
Omnimail
Send email across all platforms using one interface
Stars: ✭ 325 (+802.78%)
Mutual labels:  mailgun, sendgrid
Django Anymail
Django email backends and webhooks for Amazon SES, Mailgun, Mailjet, Postmark, SendGrid, Sendinblue, SparkPost and more
Stars: ✭ 1,109 (+2980.56%)
Mutual labels:  mailgun, sendgrid
Fluentemail
All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.
Stars: ✭ 1,888 (+5144.44%)
Mutual labels:  mailgun, sendgrid
Slmmail
Send mail from Laminas or Mezzio using external mail services.
Stars: ✭ 106 (+194.44%)
Mutual labels:  mailgun, sendgrid
Mailer
A light-weight, modular, message representation and mail delivery framework for Python.
Stars: ✭ 225 (+525%)
Mutual labels:  mailgun, sendgrid
Magento2 Gmail Smtp App
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
Stars: ✭ 281 (+680.56%)
Mutual labels:  mailgun, sendgrid
Mailcore
Emailing wrapper for Vapor 3 apps
Stars: ✭ 77 (+113.89%)
Mutual labels:  mailgun, sendgrid
keystone-email
⚠️ Archived - Legacy email helper for KeystoneJS Apps
Stars: ✭ 30 (-16.67%)
Mutual labels:  mandrill, mailgun
Email Templates
📫 Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more!
Stars: ✭ 3,291 (+9041.67%)
Mutual labels:  mandrill, sendgrid
aws-lambda-chaos-injection
Chaos Injection library for AWS Lambda
Stars: ✭ 82 (+127.78%)
Mutual labels:  amazon-web-services
cfn-cheapest-nat
Cheapest AWS VPC NAT.
Stars: ✭ 38 (+5.56%)
Mutual labels:  amazon-web-services
aws-o11y-recipes
recipes for observability solutions at AWS
Stars: ✭ 110 (+205.56%)
Mutual labels:  amazon-web-services

MailHookBundle

Catch webhook from various API mail service and directly get the related user.

Build Status Build Status

Features

Define your project url to your mail provider service (Mandrill, MailJet...) and get events dispatched into your app.

Support various service

  • Campain Monitor
  • Mailgun
  • Mailjet
  • Mandrill
  • Sendgrid
  • Sparkpost
  • And add your custom service

Example use cases:

  • Disable to a user's notification when a mail is signal as spam.
  • Send a private message to a user if last mail send get bounced.
  • Warning an Account Manager about a hard bounce on a new user creation.
  • Track email reading and clicks on your custom CRM.
  • All you want!

Installation

Add the package to your composer.json file

"scullwm/mailhookbundle": "dev-master",

Add this to app/AppKernel.php

<?php
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Swm\Bundle\MailHookBundle\SwmMailHookBundle(),
        );

        ...

        return $bundles;
    }

Configuration

1) Edit app/config.yml

swm_mail_hook:
    secretsalt: notSecret

2) Edit app/routing.yml

swm_mailhook_controller:
    resource: "@SwmMailHookBundle/Controller/"
    type:     annotation
    prefix:   /

Well done!

Use it

Go to your email service provider like mandrillapp.com and find where to configure your webhook. Check hooks you want and set the url like this:

http://www.mywebsite.com/webhook/{secretSalt}/{serviceName}/catch

With no configuration for mandrill it should be : http://www.mywebsite.com/webhook/notSecret/mandrill/catch

With a custom secretSalt and mailjet service it should be : http://www.mywebsite.com/webhook/dDifXo26/mailjet/catch

Events dispatched

  • swm.mail_hook.event.open
  • swm.mail_hook.event.send
  • swm.mail_hook.event.click
  • swm.mail_hook.event.soft_bounce
  • swm.mail_hook.event.hard_bounce
  • swm.mail_hook.event.deferral
  • swm.mail_hook.event.spam
  • swm.mail_hook.event.blocked
  • swm.mail_hook.event.unsub
  • swm.mail_hook.event.reject
  • swm.mail_hook.event.other

Events listener provided

By default, a simple MailHookEvent is dispatched by the DefaultHydrator. But if you are using FosUserBundle, you can use the FosUserHydrator to use directly UserMailHookEvent which return directly the user entity associate on the email.

If your using FosUserBundle

There's already a special route called "swm_mailhook_user_catcher_for_service": /{secretSalt}/{service}/catchuser

It directly return a UserMailHookEvent where you can getUser().

To see a basic exemple see this link : https://gist.github.com/ScullWM/8acea9c0e229ed76717f (Using JMS/di-extra-bundle optionnal)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].