https://github.com/phphleb/muller
Simple PHP Mailer
https://github.com/phphleb/muller
Last synced: 3 months ago
JSON representation
Simple PHP Mailer
- Host: GitHub
- URL: https://github.com/phphleb/muller
- Owner: phphleb
- License: mit
- Created: 2021-04-24T10:09:34.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T15:53:25.000Z (over 2 years ago)
- Last Synced: 2025-09-20T00:58:19.511Z (9 months ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## "Muller" is the strict Electronic Postman (PHP Mailer)
[](https://github.com/phphleb/hleb) [](https://github.com/phphleb/hleb)   [-brightgreen.svg)](https://github.com/phphleb/hleb/blob/master/LICENSE)
The `Muller` is not included in the original configuration of the framework [HLEB2](https://github.com/phphleb/hleb), so it must be copied to the folder with the vendor/phphleb libraries from the [github.com/phphleb/muller](https://github.com/phphleb/muller) repository or installed using Composer:
```bash
$ composer require phphleb/muller
```
Standard email sending via PHP function `mail(...)`. Used to confirm the registration of the framework, so SMTP is not supported.
```php
// Include or autoload
include '/phphleb/muller/Src/DefaultMail.php';
include '/phphleb/muller/Src/Errors.php';
include '/phphleb/muller/StandardMail.php';
$mail = new \Phphleb\Muller\StandardMail(true); // Allow sending to multiple destinations
$mail->setNameFrom('User Name');
$mail->setAddressFrom('mailbox@main-site.com');
$mail->setParameters('-fmailbox@main-site.com');
$mail->setTitle('Verification letter');
$mail->setDebug(true);
$mail->setDebugPath('/logs');
$mail->saveOnlyToFile(false);
$mail->saveFileIntoDirectory('/logs');
$mail->setTo('test-address-1@example-site.ru');
$mail->setTo('test-address-2@example-site.ru', 'Recipient 2');
$mail->setToMultiple(['test-address-3@example-site.ru' => 'Recipient 3', 'test-address-4@example-site.ru' => 'Recipient 4']);
$mail->setContent('
Test letter text.
');
$mail->send();
var_dump($mail->getErrors());
```