-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from KvestIn/develop
#2 Дополнил readme информацией по вложениям
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
opm install InternetMail | ||
``` | ||
|
||
## Пример работы | ||
## Пример работы (отправка HTML письма с вложениями) | ||
|
||
```bsl | ||
|
@@ -30,11 +30,18 @@ opm install InternetMail | |
Сообщение.ОбратныйАдрес.Добавить("[email protected]"); | ||
Сообщение.Отправитель = "[email protected]"; | ||
Сообщение.Тема = "Server is down"; | ||
Сообщение.Тексты.Добавить("Очень нужный и важный текст"); | ||
Сообщение.Тексты.Добавить("Не очень нужный текст. Придёт вложением"); | ||
Текст = " | ||
|<h3>Server is down !</h3> | ||
|Надо что-то делать.<br/>"; | ||
Сообщение.Тексты.Добавить(Текст, ТипТекстаПочтовогоСообщения.HTML); | ||
Сообщение.Вложения.Добавить("C:/Пример вложения 1.docx"); | ||
Сообщение.Вложения.Добавить( | ||
Новый ДвоичныеДанные("C:/Пример вложения 2.docx"), | ||
"Пример вложения 2.docx" | ||
); | ||
Почта = Новый ИнтернетПочта; | ||
Почта.Подключиться(Профиль, ПротоколИнтернетПочты.POP3); | ||
Почта.Послать(Сообщение, , ПротоколИнтернетПочты.SMTP); | ||
``` |