Download the PHP package cabanga/smail-service without Composer

On this page you can find all versions of the php package cabanga/smail-service. 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 smail-service

Smail (Simple Mail Service) - Email Microservice for Receiving Contact Form Submissions

PHP Version License: MIT Docker Ready [Tests]()

Smail is a secure and configurable PHP email microservice designed to serve as the backend for contact forms on static websites (HTML/CSS/JS, VueJS, React, etc.). With a single implementation, it can support multiple websites without the need for a full backend.

This service was built with a focus on security, flexibility, and ease of implementation.

Features

Requirements

Installation & Deployment

With Docker (Recommended)

  1. Create a file named docker-compose.yml and paste the following content. Make sure to use the latest image version (or download it from the repository).

  2. Edit Environment Variables: Adjust the values in the environment: section to match your SMTP credentials, allowed domains, etc.

  3. Start the Service: In the same folder where you saved the file, run:

  4. Check if it works: The service should now be accessible at http://localhost:8080.

  5. To stop the service, run:

Manual Installation

  1. Clone the repository:

  2. Install dependencies:

  3. Configure the environment:

Edit the .env file with your custom configuration.

  1. Configure Web Server:

Point the root of your web server (Apache, Nginx) to the /public folder. Make sure URL rewrites (mod_rewrite) are enabled.

Manual via Composer

Using Composer, just run one command and follow up with web server setup:

Usage (Service)

Endpoint

Request Body (JSON)

Basic Use

Uses the default email template. The query field is required.

Advanced Use

Allows customized behavior.

API Responses

Success (200 OK)

en:

pt:

Error (4xx or 5xx)

en:

pt:

JavaScript Example

CRITICAL SECURITY WARNING

The API key should NEVER be hardcoded directly in your public JavaScript file. Anyone can view the source code and steal it.

Best practice? Inject the key into your frontend using client-side environment variables. Your build process should then securely make it available to your JavaScript.

To further enhance security, you may enable Google reCAPTCHA. Smail supports it out-of-the-box.

Examples:

License

This project is licensed under the MIT License.

WARNING: Modifications require authorization.


All versions of smail-service with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
phpmailer/phpmailer Version ^6.10
vlucas/phpdotenv Version ^5.6
ezyang/htmlpurifier Version ^4.17
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 cabanga/smail-service contains the following files

Loading the files please wait ...