|
| 1 | +[](https://gitter.im/phpMussel2/Lobby) |
| 2 | +[](https://maikuolan.github.io/Compatibility-Charts/) |
| 3 | +[](https://maikuolan.github.io/Compatibility-Charts/) |
| 4 | +[](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) |
| 5 | +[](http://makeapullrequest.com) |
| 6 | + |
| 7 | +## **What is phpMussel?** |
| 8 | + |
| 9 | +An ideal solution for shared hosting environments, where it's often not possible to utilise or install conventional anti-virus protection solutions, phpMussel is a PHP script designed to **detect trojans, viruses, malware and other threats** within files uploaded to your system wherever the script is hooked, based on the signatures of [ClamAV](https://www.clamav.net/) and others. For information regarding *HOW TO INSTALL* {2A+2B} and *HOW TO USE* {3A+3B} phpMussel, please refer either to the [Wiki](https://github.com/phpMussel/phpMussel/wiki) or to the [documentation](https://github.com/phpMussel/Docs/tree/master) (direct links to that documentation included under the "Documentation" header below this paragraph). |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | + |
| 14 | +### What's this repository for? |
| 15 | + |
| 16 | +This provides a bridge between phpMussel and PHPMailer, enabling phpMussel to utilise PHPMailer for two-factor authentication, email notification about blocked file uploads, etc. |
| 17 | + |
| 18 | +``` |
| 19 | +composer require phpmussel/phpmailer |
| 20 | +``` |
| 21 | + |
| 22 | +__*Example:*__ |
| 23 | +```PHP |
| 24 | +<?php |
| 25 | +// Path to vendor directory. |
| 26 | +$Vendor = __DIR__ . DIRECTORY_SEPARATOR . 'vendor'; |
| 27 | + |
| 28 | +// Composer's autoloader. |
| 29 | +require $Vendor . DIRECTORY_SEPARATOR . 'autoload.php'; |
| 30 | + |
| 31 | +$Loader = new \phpMussel\Core\Loader(); |
| 32 | +$Scanner = new \phpMussel\Core\Scanner($Loader); |
| 33 | +$FrontEnd = new \phpMussel\FrontEnd\FrontEnd($Loader, $Scanner); |
| 34 | +$Web = new \phpMussel\Web\Web($Loader, $Scanner); |
| 35 | +$Loader->Events->addHandler('sendMail', new \phpMussel\PHPMailer\Linker($Loader)); |
| 36 | + |
| 37 | +$Web->scan(); |
| 38 | +$FrontEnd->view(); |
| 39 | + |
| 40 | +unset($Web, $FrontEnd, $Scanner, $Loader); |
| 41 | +``` |
| 42 | + |
| 43 | +#### See also: |
| 44 | +- [phpMussel/phpMussel](https://github.com/phpMussel/phpMussel) – The main phpMussel repository (you can get phpMussel versions prior to v3 from here). |
| 45 | +- [phpMussel/Core](https://github.com/phpMussel/Core) – phpMussel core (dedicated Composer version). |
| 46 | +- [phpMussel/CLI](https://github.com/phpMussel/CLI) – phpMussel CLI-mode (dedicated Composer version). |
| 47 | +- [phpMussel/FrontEnd](https://github.com/phpMussel/FrontEnd) – phpMussel front-end (dedicated Composer version). |
| 48 | +- [phpMussel/Web](https://github.com/phpMussel/Web) – phpMussel upload handler (dedicated Composer version). |
| 49 | +- [phpMussel/Examples](https://github.com/phpMussel/Examples) – Prebuilt examples for phpMussel (useful for users which don't want to use Composer to install phpMussel). |
| 50 | +- [phpMussel/plugin-boilerplates](https://github.com/phpMussel/plugin-boilerplates) – This repository contains boilerplate code which can be used to create new plugins for phpMussel. |
| 51 | +- [phpMussel/Plugin-PHPMailer](https://github.com/phpMussel/Plugin-PHPMailer) – Provides 2FA and email notifications support for phpMussel v3+. |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | + |
| 56 | +Last Updated: 6 July 2020 (2020.07.06). |
0 commit comments