Download the PHP package shieldon/messenger without Composer

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

Sending messages to the third-party services made easy for PHP.

Supported modules:

More modules will come in the future...

Installation

Use PHP Composer:

Or, download it and include the Messenger autoloader.

Basic Usage

Public API methods:

Other than the Mailer classes, the only one public API is send(). The only thing you need to do is to assign the required data fields into constructor when initializing instance.

Telegram

Open your Telegram App, add BotFather to start a new conversation. Type command /newbot to obtain your API key.

Remember, make sure your channel type is public. If you want to send messages to your private channel, googling will find solutions.

Line Notify

The access token can be obtained by clicking Generate token button at this signup page.

Once you have obtained your developer access token for the chat group you choose, invite Line Notify bot join your Line group, then the following code will work as expected.

RocketChat

Slack

Please clearfully read Slack's official API docs to find out things you need.

Guide:

Slack Webhook

This would be the simplest way for messaging. Please clearfully read Slack's official API docs to find out things you need.

ok.


Mailer Usage

Public API methods:

There is no need to metion content type when using Mailer, the content type is automatically detected.

Mail

Native PHP mail function. To use this class, be sure you have set the settings right in your php.ini.

SMTP

A very simple SMTP client.

Note:

If you would like to use SMTPS or STARTTLS, the $host should have a prefix.

For example:

SendGrid

If you have SendGrid API key, you can also send messages via SendGrid easily.

MailGun

MailGun SMTP

Extended from Smtp, a ready-to-use MailGun SMTP client.

Gmail

Extended from Smtp, a ready-to-use Gmail SMTP client.

Note:

Google doesn't like people use their SMTP server to sending email by scripts, to make sure it can work without problems, you have to set the settings right:

Yahoo Mail

Extended from Smtp, a ready-to-use Yahoo SMTP client.

Note: You can use your account password but if you are facing the following error:

That is because that Yahoo might not allow 3rd-party products access the SMTP server by default. To resolve this problem:

Outlook Mail (Office365)

Extended from Smtp, a ready-to-use Yahoo SMTP client.

Note:

When sending email via Office365 SMTP server at the first time, you will receive a notification email from Outlook.com Team to confirm your activity.

Once you have completed the validation, you will be able to send email via Office365 SMTP server.


Debug

debugMode()

If you would like to catch exceptions, you use turn debugMode on. This option will throw exceptions when error occurred.

For example:

printResult()

If you would like to print the executed results, you can use printResult().

For example:

If the email is sent successfully, the result will look like the text below:


Author

Messenger library is brought to you by Terry L. from Taiwan.

Shieldon Messenger is initially designed for a part of the Shieldon Firewall, sending notifications to webmasters or developers when their web applications are possibly under attacks. If you are looking for a web security library to protect your website, Shieldon Firewall might be a good choice for you.

License

MIT


All versions of messenger with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
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 shieldon/messenger contains the following files

Loading the files please wait ....