Download the PHP package eustasy/browning without Composer

On this page you can find all versions of the php package eustasy/browning. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package browning

Browning: A Mailgun Script (v1.31)

Normal (PHP) Normal (Markdown) Normal (Security) Test (PHP) CodeQL Maintainability Code Coverage

Browning is a tiny PHP library to send emails with Mailgun, that uses CURL instead of Mailgun's (slightly porky) library. Requires PHP 8.1+ and the cURL extension.

Installation

Then include the Composer autoloader:

This makes the Eustasy\Browning\Mailer and Eustasy\Browning\Recaptcha classes available.

1. Setup with Mailgun

The cURL extension is required. On Debian/Ubuntu:

Sign up for Mailgun — the free tier covers 100 emails per day. See pricing for the paid tiers.

Copy the bundled config template out of vendor/, for example to config/browning.php:

Open your copy and fill in your details — it's a PHP file that returns a config array (loaded with require in step 2):

Add config/browning.php to your .gitignore to avoid committing credentials.

2. Sending email

Build a Mailer from your config and call send():

send() returns a Eustasy\Browning\Result:

Property Type Description
success bool true if the email was accepted by Mailgun.
error string\|null Error message, or null on success.

By default error is a friendly, user-safe message. Pass debug: true to get technical detail instead:

Prefer explicit wiring? Construct it directly. The constructor also accepts a custom Transport as its fifth argument — that's how the tests avoid the network:

3. Setup with reCAPTCHA

To protect a form with Google reCAPTCHA v2, add your keys under Recaptcha in the config — SiteKey for the form, SecretKey for verification.

Keys come from the Google reCAPTCHA admin console.

4. CAPTCHA form

Add the widget to your HTML form, using your site key:

5. CAPTCHA validation

Verify the response server-side before sending:

verify() returns a Eustasy\Browning\RecaptchaResult with success (bool), errorCodes (string[]), and error (string|null).


All versions of browning with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package eustasy/browning contains the following files

Loading the files please wait ...