All Projects → yiisoft → Yii2 Swiftmailer

yiisoft / Yii2 Swiftmailer

Licence: bsd-3-clause
Yii 2 swiftmailer extension.

Projects that are alternatives of or similar to Yii2 Swiftmailer

Yii2 Apidoc
Yii 2 apidoc extension.
Stars: ✭ 236 (+116.51%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Openapi
REST API application generator for Yii2, openapi 3.0 YAML -> Yii2
Stars: ✭ 99 (-9.17%)
Mutual labels:  hacktoberfest, yii2, yii
yii2-symfonymailer
Yii 2 Symfony mailer extension.
Stars: ✭ 29 (-73.39%)
Mutual labels:  mail, yii2, mailer
Yii2 Gii
Yii 2 Gii Extension
Stars: ✭ 183 (+67.89%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Redis
Yii 2 Redis extension.
Stars: ✭ 416 (+281.65%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Bootstrap4
Yii 2 Bootstrap 4 Extension
Stars: ✭ 204 (+87.16%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Docker
Official Docker images suitable for Yii 2.0
Stars: ✭ 286 (+162.39%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Sphinx
Yii 2 Sphinx extension.
Stars: ✭ 172 (+57.8%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Httpclient
Yii 2 HTTP client
Stars: ✭ 406 (+272.48%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Elasticsearch
Yii 2 Elasticsearch extension
Stars: ✭ 401 (+267.89%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Smarty
Yii 2 Smarty Extension.
Stars: ✭ 67 (-38.53%)
Mutual labels:  hacktoberfest, yii2, yii
Php Mime Mail Parser
A fully tested email parser for PHP 7.2+ (mailparse extension wrapper).
Stars: ✭ 687 (+530.28%)
Mutual labels:  hacktoberfest, email, mail
Yii2 Debug
Debug Extension for Yii 2
Stars: ✭ 179 (+64.22%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2
Yii 2: The Fast, Secure and Professional PHP Framework
Stars: ✭ 13,852 (+12608.26%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Bootstrap
Yii 2 Bootstrap 3 Extension
Stars: ✭ 177 (+62.39%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Imagine
Yii 2 imagine extension
Stars: ✭ 271 (+148.62%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Shell
Interactive shell
Stars: ✭ 129 (+18.35%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Twig
Yii 2 Twig extension.
Stars: ✭ 130 (+19.27%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 Mongodb
Yii 2 MongoDB extension
Stars: ✭ 299 (+174.31%)
Mutual labels:  hacktoberfest, yii2, yii
Yii2 App Basic
Yii 2.0 Basic Application Template
Stars: ✭ 548 (+402.75%)
Mutual labels:  hacktoberfest, yii2, yii

SwiftMailer Extension for Yii 2


This extension provides a SwiftMailer mail solution for Yii framework 2.0.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads Build Status

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('[email protected]')
     ->setTo($form->email)
     ->setSubject($form->subject)
     ->send();

For further instructions refer to the related section in the Yii Definitive Guide.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].