Giter Site home page Giter Site logo

civicrm-ses's Introduction

ses

This extension exposes a webhook page to process bounces from Amazon SES (Simple Email Service) through Amazon SNS (Simple Notification Service) notifications.

The extension is licensed under AGPL-3.0.

Requirements

  • PHP v7.1+
  • CiviCRM 5.19+

Installation

See: https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/#installing-a-new-extension

Usage

The webhook verifies that the Notification or SubscriptionConfirmation it's been originated and sent by the SNS service (as per SNS docs), if the Notification is a SubscriptionConfirmation it automatically subscribes to it, if it's a Bounce, it maps SES' bounce type to Civi's bounce type.

Hard bounce mapping

SES CiviCRM
Undetermined Syntax
General, NoEmail, Suppressed Invalid

Soft bounce mapping

SES CiviCRM
General Syntax
MessageTooLarge, MailboxFull Quota
ContentRejected, AttachmentRejected Spam

Please see Amazon's guide and documentation on how to setup SNS notifications for SES.

Webhook url:

Future features/wishes/would like to do

  • Send using API (instead of SMTP)
  • UI to create Topic and Subscription without leaving CiviCRM
  • Send statistics, and reputation dashlets

Also see: https://github.com/mecachisenros/aws which could replace this extension in the future.

Known Issues

None that I'm aware of, report here if you find any and be aware that this extension is at a beta stage.

civicrm-ses's People

Contributors

mattwire avatar mecachisenros avatar michaelmcandrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

civicrm-ses's Issues

Forward mailing using action.forward token bounces due to unverified sender.

  1. Create and send a mailing containing the action.forward token.
  2. Recipient clicks the Forward link and is taken to the Forward Mailing page (/civicrm/mailing/forward).
  3. Recipient enters one or more email addresses to receive the mailing and clicks the Forward button.
  4. Each of the forwarded messages bounce with code: 554, response: Message rejected: Email address is not verified.

This happens because the messages contain the email address of the original recipient as the sender which is an unverified email address. Amazon SES requires the sender email to be a verified address.

There is a feature request on the Amazon AWS forum about using SES to send "on behalf of" users' personal email addresses that has not been implemented.

SNS configuration question

The SNS "create subscription" page asks for the protocol of the endpoint. I'm unsure whether the correct answer is "HTTPS" or "Platform application endpoint". Can you clarify? Thanks.

How to debug?

I'm trying to get this set up and am having trouble. Amazon says my SNS HTTPS subscription was confirmed successfully, and my CloudWatch logs say that notifications are being delivered. But no new contacts are showing up as on hold, and no new bounces are showing up in CiviCRM.

What do I need to check to figure this out?

Bounce not processed if VERP Localpart configured

Function get_verp_items() does not account for Localpart if configured in CiviMail account settings, and bounce processing will fail if present.

CRM/Ses/Page/Webhook.php::get_verp_items() should be something like this:

protected function get_verp_items( $header_value ) {
	$localpart = CRM_Core_BAO_MailSettings::defaultLocalpart();
	$verp_items = substr( substr( $header_value, 0, strpos( $header_value, '@' ) ), sizeof( $localpart ) + 2 );
	return explode( $this->verp_separator, $verp_items );
}

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.