Skip to content
PHP-LIB: Browning is a tiny PHP function to send emails with Mailgun, that uses CURL instead of Mailgun's (slightly porky) library.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
_functions/browning
_settings
_templates
.codacy.yml
.codeclimate.yml
.eslintignore
.eslintrc.json
.gitignore
.mdlrc
.mdlrc.style.rb
.stylelintignore
.stylelintrc.json
.travis.yml
LICENSE.md
README.md
composer.json
index.php

README.md

Browning: A Mailgun Script

Browning is a tiny PHP function to send emails with Mailgun, that uses CURL instead of Mailgun's (slightly porky) library.

Build Status Codacy Badge Code Climate Bountysource

Setup

If possible, make sure you have the following packages installed before using this script. It may work without some of them, but all are recommended. CURL is required. libmagic-dev php-dev libcurl3 php-curl

Usage

To use, do somethings like this.

require '_settings/browning.default.php';
include '_settings/browning.custom.php';
require '_functions/browning/function.browning.php';

$Mail = Browning(
	'recepient@example.com',
	'Message Subject',
	'Text or HTML Body',
	'Sender Name',
	'reply-to@example.com',
	true
);

if ( $Mail['Success'] ) {
	echo '<h2>Success! We managed to send the E-Mail.</h2>'.PHP_EOL;
	echo '<p class="sub-title">Thanks for believeing in us.</p>'.PHP_EOL;
} else {
	echo '<h2>Sorry, we failed to send the E-Mail.</h2>'.PHP_EOL;
	echo '<p class="sub-title error">'.$Mail['Error'].'</p>'.PHP_EOL;
	echo '<!--'.PHP_EOL;
	var_dump($Mail);
	echo PHP_EOL.'-->'.;
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.