Download the PHP package theoafactor/messenger without Composer

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

Messenger

An email and message sender.

  1. Easily sends emails to users

  2. Add the project

  3. Add the following lines at the top of your project:

  4. Create an instance of the Messenger class

  5. Send your email.

  6. The sendMessage() method takes the following arguments:

    • recepient's email address
    • email subject
    • some extra data in the form of associative array
    • the file path of email template to be used
  7. Of all the arguments, the recepient's email address and email subject are compulsory, while the others are not. But it's a good thing to set these arguments.

Setting Environmental Values

  1. You should set the environmental values with .env file at the root of your project. Please use the .env.example file as an example.

  2. Create a .env file and copy the sample from .env.example file inside theoafactor/messenger/src directory over.

  3. Supply the data.

Using Email Templates

  1. The package uses a mini template engine. The engine will look for your email template in the root of the directory.

  2. Variables are outputted with {{ variable_name }} within the template.

  3. Variables data come from the extra data associative array passed to the sendMessage() method. For example, in the code below, we have set the extra data associate array to have the firstname and lastname keys.

  4. In the email template, we can reference the firstname key by using:

Loops

  1. This package uses basic looping mechanism and only supports the foreach loop. To loop through an array in the template, follow the sample below:

  2. Remember that the arrayKey comes from the data you passed to the sendMessage() method.

  3. Support for nested loops has not been added.

  4. Support for conditional statements has not been added.

Note

  1. This project is actively under development. You may use it for your project. You may also contribute to this project by creating a pull request.

  2. Please report any security issue as soon as you spot one.

Author: Olu Adeyemo [[email protected]]


All versions of messenger with dependencies

PHP Build Version
Package Version
Requires phpmailer/phpmailer Version ^6.6
devcoder-xyz/php-dotenv Version ^1.1
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 theoafactor/messenger contains the following files

Loading the files please wait ....