All Projects → Stampie → Stampie

Stampie / Stampie

Licence: mit
Library for using online Email providers

Projects that are alternatives of or similar to Stampie

release-notify-action
GitHub Action that triggers e-mails with release notes when these are created
Stars: ✭ 64 (-77.3%)
Mutual labels:  mailer, sendgrid
Sendgrid Mailer
Provides Sendgrid integration for Symfony Mailer
Stars: ✭ 24 (-91.49%)
Mutual labels:  sendgrid, mailer
Airform
Functional HTML forms for Front-End Developers.
Stars: ✭ 307 (+8.87%)
Mutual labels:  sendgrid, mailer
mailchimp-mailer
Provides Mailchimp integration for Symfony Mailer
Stars: ✭ 20 (-92.91%)
Mutual labels:  mailer
nest-sendgrid
No description or website provided.
Stars: ✭ 24 (-91.49%)
Mutual labels:  sendgrid
mailcoach-support
Questions and support for Mailcoach
Stars: ✭ 32 (-88.65%)
Mutual labels:  sendgrid
mailing
📬 Sending emails with pleasure and prepared templates.
Stars: ✭ 15 (-94.68%)
Mutual labels:  mailer
bulk-mail-cli
Do quick, hassle-free email marketing with this small but very powerful tool! 🔥
Stars: ✭ 88 (-68.79%)
Mutual labels:  mailer
content-reminder
⏰ A GitHub Action that reminds you to share your own content
Stars: ✭ 28 (-90.07%)
Mutual labels:  sendgrid
Dracker
An iOS and React App to track debt and send/receive payments.
Stars: ✭ 22 (-92.2%)
Mutual labels:  sendgrid
postmark-mailer
Provides Postmark integration for Symfony Mailer
Stars: ✭ 28 (-90.07%)
Mutual labels:  mailer
mail
Actively maintained fork of gomail. The best way to send emails in Go.
Stars: ✭ 376 (+33.33%)
Mutual labels:  mailer
Mail
RiiConnect24 Mail Scripts. OSS.
Stars: ✭ 11 (-96.1%)
Mutual labels:  sendgrid
monolog-http
A collection of monolog handlers that use a PSR-18 HTTP Client to send your logs
Stars: ✭ 34 (-87.94%)
Mutual labels:  sendgrid
email
Aplus Framework Email Library
Stars: ✭ 127 (-54.96%)
Mutual labels:  mailer
eventigo-web
Events aggregator and newsletter
Stars: ✭ 22 (-92.2%)
Mutual labels:  sendgrid
zaqar
Email microservice writen in Node.js
Stars: ✭ 52 (-81.56%)
Mutual labels:  sendgrid
contoso-university
Contoso University demo using asp net core and related technologies
Stars: ✭ 42 (-85.11%)
Mutual labels:  sendgrid
Laravel-SwiftMailer
Laravel and SwiftMailer integration fix for Queued deamon workers
Stars: ✭ 24 (-91.49%)
Mutual labels:  mailer
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 (-0.35%)
Mutual labels:  sendgrid

Stampie

Build Status

Stampie is a simple API Wrapper for different email providers such as Postmark and SendGrid.

It is very easy to use and to integrate into your application as demonstrated below with a SendGrid mailer.

Providers

<?php

// composer autoloading.
require 'vendor/autoload.php';

class Message extends \Stampie\Message
{
	public function getFrom() { return '[email protected]'; }
	public function getSubject() { return 'You are trying out Stampie'; }
	public function getText() { return 'So what do you think about it?'; }
}

$adapter = new Http\Adapter\Guzzle6\Client();
$mailer = new Stampie\Mailer\SendGrid($adapter, 'username:password');

// Throws an HttpException for error
// messages not recognized by SendGrid api or ApiException for known errors.
$mailer->send(new Message('[email protected]'));

This simple example shows a few different things about how Stampie works under the hood and is developed. Because others are so much better than us to do HTTP communication, Stampie uses the HTTPlug abstraction so you are free to choose between any library like Buzz or Guzzle. See the full list here: https://packagist.org/providers/php-http/client-implementation

Every mailer takes a $serverToken as the second argument in their constructor. This is what is used for authentication. In the Postmark mailer this is a hash but in SendGrid it is a username:password pattern that is split into two pieces and send as arguments. A mailer is responsible for formatting the request needed for a given API.

A Message or MessageInterface is a simple storage class that holds information about the message sent to an API such as the email address this is from and who should recieve it together with html and text bodies.

Last there is an Interface for every type of class or abstract implementation that should be used when adding new Mailer's or Adapter's.

Installation

Stampie is not hard coupled to Guzzle or any other library that sends HTTP messages. It uses an abstraction called HTTPlug. This will give you the flexibility to choose what PSR-7 implementation and HTTP client to use.

If you just want to get started quickly you should run the following command:

composer require stampie/stampie php-http/curl-client php-http/message guzzlehttp/psr7

Why requiring so many packages?

Stampie has a dependency on the virtual package php-http/client-implementation which requires to you install an adapter, but we do not care which one. That is an implementation detail in your application. We also need a PSR-7 implementation and a message factory.

You do not have to use the php-http/curl-client if you do not want to. You may use the php-http/guzzle6-adapter or any other library in this list. Read more about the virtual packages, why this is a good idea and about the flexibility it brings at the HTTPlug docs.

Documentation

There is generated API documentation for all tags and released versions. Those can be found at stampie.github.io/Stampie/api/master/.

Extensions

  • Stampie Extra provides extensions to Stampie using the Symfony EventDispatcher component.

Framework integration

Stampie is itself completely decoupled and does not depend on any framework.

Integrations

Testing

Stampie is Continuous Integration tested with Travis and aims for a high coverage percentage.

Developing

As mentioned above if integrating new mailers or adapters please rely on the interfaces or abstract classes already in this package. Furthermore unit tests should be provided aswell.

Feedback

This is a project created to test TDD along the way and maybe have some scars from that. But you are always welcome to send feedback or Github, Twitter, Github issue or Pull Request. Same goes if something is wrong or you have ideas for a better or smarter implementation.

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].