
Yii2-swiftmailer (отправка email сообщений)
yiisoft/yii2-swiftmailer
-
Семенов Александр
- /
- Other
- /
- 8 years ago
- /
- /
- 9686
- /
- 0
Publication time: Wednesday, June 24, 2015 (8 years ago)
Created by: Семенов Александр Сергеевич
Category: Other
Current version:
Jan 1, 1970, 3:00:00 AM (53 years ago)
Packagist: yiisoft/yii2-swiftmailer
: https://github.com/yiisoft/yii2-swiftmailer
:
Type of: Компонент
SwiftMailer Extension for Yii 2
This extension provides a SwiftMailer mail solution for Yii framework 2.0.
For license information check the LICENSE-file.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer
or add
"yiisoft/yii2-swiftmailer": "~2.1.0"
to the require section of your composer.json.
Note: Version 2.1 of this extensions uses Swiftmailer 6, which requires PHP 7. If you are using PHP 5, you have to use version 2.0 of this extension, which uses Swiftmailer 5, which is compatible with PHP 5.4 and higher. Use the following version constraint in that case:
"yiisoft/yii2-swiftmailer": "~2.0.0"
Usage
To use this extension, simply add the following code in your application configuration:
return [
//....
'components' => [
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
],
],
];
You can then send an email as follows:
Yii::$app->mailer->compose('contact/html')
->setFrom('from@domain.com')
->setTo($form->email)
->setSubject($form->subject)
->send();
For further instructions refer to the related section in the Yii Definitive Guide.
Yii Framework 2 swiftmailer extension Change Log
2.1.4 under development
- no changes in this release.
2.1.3 December 30, 2021
- Enh #91: Clone signers when cloning
Message
, emit warning whenopendkim
is used (WinterSilence)
2.1.2 September 24, 2018
- Bug #67: If transport is gone, try to restart transport (mikk150)
- Bug #67: Test if transport is gone each time someone tries to send email, not if connection is initially made (mikk150)
- Enh #63: Added ability to specify the disposition of an attachment by supplying a
setDisposition
value when embedding content in a message (CorWatts)
2.1.1 April 25, 2018
- Bug #61: Fixed
yii\swiftmailer\Mailer::setTransport
has no effect after sending of first message (dmitry-kulikov)
2.1.0 August 04, 2017
- Enh #31: Added support for SwiftMailer 6.0.x (klimov-paul)
2.0.7 May 01, 2017
- Bug #46: Fixed
yii\swiftmailer\Message
does not clones$swiftMessage
during its own cloning (evpav, klimov-paul) - Enh #37:
yii\swiftmailer\Logger
now chooses logging level depending on incoming entry format (klimov-paul) - Enh #40: Added
yii\swiftmailer\Message::setHeaders()
allowing to setup custom headers in batch (klimov-paul)
2.0.6 September 09, 2016
- Enh #6: Added ability to specify custom mail header at
yii\swiftmailer\Message
(klimov-paul) - Enh #23: Added
yii\swiftmailer\Message::setReturnPath()
shortcut method (klimov-paul) - Enh #27: Added ability to specify message signature (klimov-paul)
- Enh #32: Added
yii\swiftmailer\Message::setReadReceiptTo()
shortcut method (klimov-paul) - Enh: Added
yii\swiftmailer\Message::setPriority()
shortcut method (klimov-paul)
2.0.5 March 17, 2016
- Bug #9: Fixed
Mailer
does not check if property is public, while configuring ‘Swift’ object (brandonkelly, klimov-paul)
2.0.4 May 10, 2015
- Enh #4: Added ability to pass SwiftMailer log entries to
Yii::info()
(klimov-paul)
2.0.3 March 01, 2015
- no changes in this release.
2.0.2 January 11, 2015
- no changes in this release.
2.0.1 December 07, 2014
- no changes in this release.
2.0.0 October 12, 2014
- no changes in this release.
2.0.0-rc September 27, 2014
- no changes in this release.
2.0.0-beta April 13, 2014
- Bug #1817: Message charset not applied for alternative bodies (klimov-paul)
2.0.0-alpha, December 1, 2013
- Initial release.
dev-master — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.1.3 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.1.2 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.1.1 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.1.0 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.7 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.6 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.5 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.4 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.3 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.2 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.1 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.0 — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.0-rc — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.0-beta — Jan 1, 1970, 3:00:00 AM (53 years ago)
2.0.0-alpha — Jan 1, 1970, 3:00:00 AM (53 years ago)
Стандартная установка:
Добавьте composer.json файл вашего проекта:
"yiisoft/yii2-swiftmailer": "*"
Запустите обновление зависимостей
All Comments (0)