Download the PHP package benjosiah/smtp-express-php without Composer

On this page you can find all versions of the php package benjosiah/smtp-express-php. 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 smtp-express-php

SMTP Express PHP SDK

The SMTP Express PHP SDK provides a simple, extensible way to send emails using the SMTP Express API from any PHP application.

🚀 Lightweight, flexible, and built with Guzzle for efficient HTTP communication.


✨ Features


📦 Installation

To start using the SMTP Express PHP SDK in your project, you need to install it using Composer, a common dependency management tool for PHP. Open your project's terminal and run the following command:

🔧 Configuration

Before you can send emails, you need to configure the SDK with your SMTP Express project secret. This secret authenticates your application with the SMTP Express API. In your PHP code, you'll need to include the autoloader (which was set up during installation) and then create an instance of the SmtpExpress class, providing your project secret:

Make sure to replace 'your-project-secret' with the actual secret key from your SMTP Express account.

🚀 Usage

1. 📄 Send Plain Text or HTML Message

You can create a new SendMail object, set the subject, the email content (which can be plain text or HTML), the sender's email and name, and the recipient's email and name. Then, use the $smtp->sendEmail() method to send the email

2. 🧩 Send Custom HTML Template

If you have custom HTML templates for your emails, you can load these templates, replace placeholders (like {{ name }}) with actual data, and then send the resulting HTML as the email body. In this example, the email.html file would contain your HTML template with placeholders like {{ name }}.

3. 🧠 Send SMTP Express Template

If you are using templates stored directly within your SMTP Express account, you can refer to them by their ID and provide the necessary data for the dynamic parts of the template.

Replace 'template-id' with the actual ID of your SMTP Express template.

4. 📅 Send Calendar Event Email

To send an email with a calendar event invite, you can use the calendarEvent() method, providing the event title, start time, and end time. The date and time should be provided in ISO 8601 format (e.g., YYYY-MM-DDTHH:MM:SS.SSSZ).

❗ Error Handling

The SDK provides a SmtpExpressException that you can catch to manage these situations.

📁 Project Structure

📝 License

The SMTP Express PHP SDK is released under the MIT license © Josiah

💬 Feedback or Support?

Email [email protected]


All versions of smtp-express-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.9
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 benjosiah/smtp-express-php contains the following files

Loading the files please wait ....