Add doc for LE_MAIL

This commit is contained in:
Pavel Belyaev
2021-09-04 12:38:13 +05:00
parent bc4c0ddddc
commit b7b4af5a10
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
[< Documentation](../)
# LE_MAIL
&copy; by Pavel Belyaev, LE Framework, Tech-Research.ru
## About
Простейший класс для отправки почты механизмом sendmail, требует настроеного MTA (например, Postfix)
### Применение
#### Обычное письмо HTML
```php
$mail = new LE_MAIL;
$from="robot@example.org";
$to="mymail@example.org";
$subject="test123";
$body="<p>text of mail</p>";
$mail->send($from,$to,$body,$subject);
```
#### Письмо с вложением
```php
$mail = new LE_MAIL;
$from="robot@example.org";
$to="mymail@example.org";
$subject="test123";
$body="<p>text of mail</p>";
$files = [];
//пути до файлов
$files[] = __DIR__."/1.xls";
$files[] = __DIR__."/2.xls";
$mail->send($from,$to,$body,$subject,$files);
```