-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
529a79b
commit 724c452
Showing
3 changed files
with
61 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
# MultipartEmail | ||
|
||
A simple class to send email with attachments via PHP. Features: | ||
- Send UTF8 email with base64 encoded all parts | ||
- Send email with HTML and text parts (alternative) | ||
- Send email with attachments (multipart) | ||
- Send HTML email with images (embed, multipart related) | ||
|
||
Emails is sent by built-in mail() function, no direct connection to SMTP server required. Class uses any input charset: UTF8 (default), Windows-1251 etc. | ||
|
||
See example below. | ||
|
||
## MultipartEmail (ru) | ||
|
||
Максимально простой класс для отправки почты с вложениями на PHP. Возможности: | ||
- Отправка почты в UTF8 с кодированием в base64 всех частей сообщения | ||
- Отправка почты с HTML и текстовой частями (alternative) | ||
|
@@ -11,8 +23,7 @@ | |
|
||
Пример использования: | ||
|
||
<?php | ||
require('MultipartEmail.php'); | ||
<?php | ||
$email = new MultipartEmail(); | ||
$email->setFrom("Me <[email protected]>"); | ||
$email->setSubject("Поздравляем с отправкой почты!"); | ||
|
@@ -21,4 +32,3 @@ | |
$email->setHtml("<h1>Дорогие товарищи!</h1> <img src=\"image.jpg\"> ..."); | ||
$email->addAttachement('/path/to/file.jpg', 'image/jpeg', 'image.jpg', false, true); | ||
$email->send(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "aleksandr.ru/multipart-email", | ||
"type": "library", | ||
"description": "Multiprt email sender", | ||
"keywords": ["email", "multipart", "related", "alternative"], | ||
"homepage": "https://github.com/Aleksandr-ru/MultipartEmail", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Aleksandr.ru", | ||
"email": "[email protected]", | ||
"homepage": "http://aleksandr.ru", | ||
"role": "Developer" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/Aleksandr-ru/MultipartEmail/issues" | ||
}, | ||
"require": { | ||
"php": ">=5.3.0", | ||
"ext-iconv": "*" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"MultipartEmail": "" | ||
} | ||
} | ||
} |