Yii Framework Symfony Mailer Integration

Related tags

Email symfony mailer yii3
Overview

Yii Mailer Library - Symfony Mailer Extension


Latest Stable Version Total Downloads Build status Scrutinizer Code Quality Code Coverage Mutation testing badge static analysis type-coverage

This package is an adapter for yiisoft/mailer relying on symfony/mailer.

Requirements

  • PHP 7.4 or higher.

Installation

The package could be installed with composer:

composer require yiisoft/mailer-symfony --prefer-dist

General usage

Creating a mailer:

use Yiisoft\Mailer\MessageBodyRenderer;
use Yiisoft\Mailer\MessageBodyTemplate;
use Yiisoft\Mailer\MessageFactory;
use Yiisoft\Mailer\Symfony\Mailer;
use Yiisoft\Mailer\Symfony\Message;

/**
 * @var \Psr\EventDispatcher\EventDispatcherInterface $dispatcher
 * @var \Symfony\Component\Mailer\Transport\TransportInterface $transport
 * @var \Yiisoft\View\View $view
 */

$template = new MessageBodyTemplate('/path/to/directory/of/view-files');

$mailer = new Mailer(
    new MessageFactory(Message::class),
    new MessageBodyRenderer($view, $template),
    $dispatcher,
    $transport,
);

Sending a mail message:

$message = $mailer->compose()
    ->withFrom('[email protected]')
    ->withTo('[email protected]')
    ->withSubject('Message subject')
    ->withTextBody('Plain text content')
    ->withHtmlBody('<b>HTML content</b>')
;
$mailer->send($message);
// Or several
$mailer->sendMultiple([$message]);

Additional methods of the Yiisoft\Mailer\Symfony\Mailer:

  • withEncryptor() - Returns a new instance with the specified encryptor instance.
  • withSigner() - Returns a new instance with the specified signer instance.

For more information about signing and encrypting messages, see the corresponding section of the documentation.

The Yiisoft\Mailer\Symfony\Message class provides a single getSymfonyEmail() method that returns a Symfony Email instance.

For use in the Yii framework, see the configuration files:

See Yii guide to mailing and Symfony Mailer documentation for more info.

Testing

Unit testing

The package is tested with PHPUnit. To run tests:

./vendor/bin/phpunit

Mutation testing

The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:

./vendor/bin/roave-infection-static-analysis-plugin

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm

License

The Yii Framework Symfony Mailer Extension is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack

Comments
  • Update yiisoft/mailer requirement from ^4.0 to ^5.0

    Update yiisoft/mailer requirement from ^4.0 to ^5.0

    Updates the requirements on yiisoft/mailer to permit the latest version.

    Release notes

    Sourced from yiisoft/mailer's releases.

    Version 5.0.0

    • Chg #52: In MessageInterface methods move a type hints from annotation to signature (@​vjik)
    • Chg #60: Raise minimal PHP version to ^8.0 (@​vjik)
    • Enh #56: Add support of yiisoft/view of version ^7.0 (@​vjik)
    Changelog

    Sourced from yiisoft/mailer's changelog.

    5.0.0 December 28, 2022

    • Chg #52: In MessageInterface methods move a type hints from annotation to signature (@​vjik)
    • Chg #60: Raise minimal PHP version to ^8.0 (@​vjik)
    • Enh #56: Add support of yiisoft/view of version ^7.0 (@​vjik)

    4.0.0 July 23, 2022

    • New #44: Add immutable method MailerInterface::withLocale() that set locale (@​thenotsoft)

    3.0.3 February 04, 2022

    3.0.2 October 26, 2021

    • Chg #40: Update the yiisoft/view dependency to ^4.0 (@​vjik)

    3.0.1 September 18, 2021

    • Chg: Update yiisoft/view dependency to ^3.0 (@​samdark)

    3.0.0 August 25, 2021

    • New #39: Add methods to Yiisoft\Mailer\MessageInterface: getDate(), withDate(), getPriority(), withPriority(), getReturnPath(), withReturnPath(), getSender(), withSender() (@​devanych)

    2.0.0 August 24, 2021

    1.0.0 July 05, 2021

    Initial release.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    status:code review dependencies php 
    opened by dependabot[bot] 2
  • Update vimeo/psalm requirement from ^4.18 to ^5.4

    Update vimeo/psalm requirement from ^4.18 to ^5.4

    Updates the requirements on vimeo/psalm to permit the latest version.

    Release notes

    Sourced from vimeo/psalm's releases.

    5.4.0

    What's Changed

    Features

    Fixes

    Internal changes

    Full Changelog: https://github.com/vimeo/psalm/compare/5.3.0...5.4.0

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 2
  • Update vimeo/psalm requirement from ^4.18 to ^5.2

    Update vimeo/psalm requirement from ^4.18 to ^5.2

    Updates the requirements on vimeo/psalm to permit the latest version.

    Release notes

    Sourced from vimeo/psalm's releases.

    5.2.0

    What's Changed

    Features

    Fixes

    Internal changes

    Typos

    New Contributors

    Full Changelog: https://github.com/vimeo/psalm/compare/5.1.0...5.2.0

    Commits
    • fb685a1 Merge pull request #8890 from weirdan/enum-forbidden-methods
    • 9db0eb3 InvalidEnumMethod requires PHP8.1+
    • 19a1005 Forbid most magic methods on enums
    • ca0b2a1 Merge pull request #8883 from weirdan/unused-messages-duplicates
    • 32eaf12 Prevent duplicate (Possibly)UnusedMethod/(Possibly)UnusedProperty
    • 114552f Merge pull request #8882 from theofidry/feature/update-cpu-core-counter
    • 4a6bfea Upgrade CpuCoreCounter
    • ef02ded Merge pull request #8833 from theofidry/feature/cpu-counter
    • af549fa Merge pull request #8854 from kkmuffme/fix-unsafe-file_get_contents
    • 2a45f18 Merge pull request #8870 from lptn/add-missing-sodium-functions
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 2
  • Update vimeo/psalm requirement from ^4.18 to ^5.1

    Update vimeo/psalm requirement from ^4.18 to ^5.1

    Updates the requirements on vimeo/psalm to permit the latest version.

    Release notes

    Sourced from vimeo/psalm's releases.

    5.1.0

    What's Changed

    Deprecations

    Features

    Fixes

    Docs

    New Contributors

    Full Changelog: https://github.com/vimeo/psalm/compare/5.0.0...5.1.0

    Commits
    • 4defa17 Merge pull request #8774 from bdsl/report-by-issue-type-severity
    • 1dbdf78 Code style fix
    • ad57727 Sort issue by position in codebase in ByIssueLevelAndTypeReport if level & ty...
    • a29f65e Fix too lax function visibility in test
    • 6693421 Code style fix
    • 5423983 Fix error in ByIssueLvelAndTypeReport heading
    • 699ee34 Indent heredoc in test
    • d6c7c86 Remove unecassary subheadings in error levels documentation
    • cd18cdc Re-order list of errors in docs
    • 9e63bf6 Minor code edits in ByIssueLevelAndType
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 2
  • Update vimeo/psalm requirement from ^4.18 to ^5.0

    Update vimeo/psalm requirement from ^4.18 to ^5.0

    Updates the requirements on vimeo/psalm to permit the latest version.

    Release notes

    Sourced from vimeo/psalm's releases.

    Psalm 5

    Welcome to Psalm 5!

    There's an accompanying post on psalm.dev, written by @​muglug & the current maintainers of Psalm.

    What's Changed

    Removed

    Features

    ... (truncated)

    Commits
    • 4e177bf Merge pull request #8790 from malarzm/patch-1
    • 7877570 Remove CallMapTest.php from Psalm self-analysis
    • 28188d1 Remove unfinished sentence
    • 6fff6df Merge pull request #8788 from weirdan/fix-xml-report-crashes-on-8.1
    • 874eb7d Fix crashes when XML report is used on PHP 8.1
    • 9d597cf Merge pull request #8782 from weirdan/check-runtime-requirements
    • 94dac9f Merge pull request #8783 from weirdan/bump-slevomat-coding-standard
    • ed36f2c Bump slevomat/coding-standard
    • 8fa35c2 Variables should outlive namespaces (#8779)
    • 05b8e0e Replace all references to static variables when moving class (#8780)
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 2
  • Update yiisoft/files requirement from ^1.0 to ^2.0

    Update yiisoft/files requirement from ^1.0 to ^2.0

    Updates the requirements on yiisoft/files to permit the latest version.

    Release notes

    Sourced from yiisoft/files's releases.

    Version 2.0.0

    • New #59: Add beforeCopy, afterCopy callbacks for FileHelper::copyFile() and FileHelper::copyDirectory() (@​Gerych1984)
    • Chg #64: Raise the minimum PHP version to 8.0 (@​Gerych1984)
    • Chg #64: Allow RecursiveDirectoryIterator as argument in FileHelper::lastModifiedTime() (@​Gerych1984)
    • Bug #58: Add missed return value and type for callback of set_error_handler() function (@​vjik)
    Changelog

    Sourced from yiisoft/files's changelog.

    2.0.0 July 05, 2022

    • New #59: Add beforeCopy, afterCopy callbacks for FileHelper::copyFile() and FileHelper::copyDirectory() (@​Gerych1984)
    • Chg #64: Raise the minimum PHP version to 8.0 (@​Gerych1984)
    • Chg #64: Allow RecursiveDirectoryIterator as argument in FileHelper::lastModifiedTime() (@​Gerych1984)
    • Bug #58: Add missed return value and type for callback of set_error_handler() function (@​vjik)

    1.0.2 January 11, 2022

    • Bug #57: Fix return type for callback of set_error_handler() function (@​devanych)

    1.0.1 December 18, 2021

    • Bug #55: Directory separator was not normalized in patterns (@​darkdef)

    1.0.0 February 10, 2021

    • Initial release.
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 2
  • using package in yii2

    using package in yii2

    can I use this package in yii2?? I want to change yii2 swiftmailer to symphony mailer.. if I can use this package, any workaround that I need to follow to use this in yii2??

    opened by biladina 2
  • Update vimeo/psalm requirement from ^4.18 to ^5.3

    Update vimeo/psalm requirement from ^4.18 to ^5.3

    Updates the requirements on vimeo/psalm to permit the latest version.

    Release notes

    Sourced from vimeo/psalm's releases.

    5.3.0

    What's Changed

    Features

    Fixes

    Docs

    Internal changes

    New Contributors

    Full Changelog: https://github.com/vimeo/psalm/compare/5.2.0...5.3.0

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Update yiisoft/test-support requirement from ^1.3 to ^3.0

    Update yiisoft/test-support requirement from ^1.3 to ^3.0

    Updates the requirements on yiisoft/test-support to permit the latest version.

    Release notes

    Sourced from yiisoft/test-support's releases.

    Version 3.0.0

    • Chg #45: Update psr/simple-cache version to ^2.0|^3.0 (@​vjik)
    Changelog

    Sourced from yiisoft/test-support's changelog.

    3.0.0 June 29, 2022

    • Chg #45: Update psr/simple-cache version to ^2.0|^3.0 (@​vjik)

    2.0.0 June 16, 2022

    • Chg #43: Raise the minimum psr/log version to ^2.0|^3.0 and the minimum PHP version to 8.0 (@​rustamwin)

    1.4.0 March 24, 2022

    • Enh #40: Add custom callback for method has() of SimpleContainer (@​vjik)
    • Bug #40: Catch only NotFoundException instead of Throwable in SimpleContainer::has() method (@​vjik)

    1.3.0 March 15, 2021

    • Enh #29: Add SimpleLogger class, which is an implementation of LoggerInterface (@​devanych)

    1.2.1 March 07, 2021

    1.2.0 February 23, 2021

    • Enh #24: Add SimpleEventDispatcher::getEventClasses() that return classes of dispatched events (@​vjik)

    1.1.0 February 22, 2021

    • Enh #23: Add SimpleEventDispatcher::clearEvents() that clear all events in event dispatcher (@​vjik)

    1.0.0 December 24, 2020

    • Initial release.
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Update yiisoft/test-support requirement from ^1.3 to ^2.0

    Update yiisoft/test-support requirement from ^1.3 to ^2.0

    Updates the requirements on yiisoft/test-support to permit the latest version.

    Release notes

    Sourced from yiisoft/test-support's releases.

    Version 2.0.0

    • Chg #43: Raise the minimum psr/log version to ^2.0|^3.0 and the minimum PHP version to 8.0 (@​rustamwin)
    Changelog

    Sourced from yiisoft/test-support's changelog.

    2.0.0 June 16, 2022

    • Chg #43: Raise the minimum psr/log version to ^2.0|^3.0 and the minimum PHP version to 8.0 (@​rustamwin)

    1.4.0 March 24, 2022

    • Enh #40: Add custom callback for method has() of SimpleContainer (vjik)
    • Bug #40: Catch only NotFoundException instead of Throwable in SimpleContainer::has() method (vjik)

    1.3.0 March 15, 2021

    • Enh #29: Add SimpleLogger class, which is an implementation of LoggerInterface (devanych)

    1.2.1 March 07, 2021

    • Enh #26: Support PSR Container v2.0 (roxblnfk)

    1.2.0 February 23, 2021

    • Enh #24: Add SimpleEventDispatcher::getEventClasses() that return classes of dispatched events (vjik)

    1.1.0 February 22, 2021

    • Enh #23: Add SimpleEventDispatcher::clearEvents() that clear all events in event dispatcher (vjik)

    1.0.0 December 24, 2020

    • Initial release.
    Commits
    • d0d9d67 Release version 2.0.0
    • 01b2501 Update README.md
    • 60a7dcf Raise the minimum psr/log version to ^2.0|^3.0 and the minimum PHP versio...
    • 376ba3b Separate chain calls (#42)
    • 481bdec Use reusables actions. (#41)
    • 971973b Prepare for next release
    • 75206d5 Release version 1.4.0
    • d98b004 Fix changelog
    • e23e7b5 Add custom callback and fix default behavior for SimpleContainer::has() (#40)
    • caeff7c Add allow-plugins to config section in composer.json
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Update composer.json

    Update composer.json

    https://symfony.com/doc/current/mailer.html#s-mime-signer

    | Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues |

    status:under development 
    opened by WinterSilence 1
  • Image embeded no works.

    Image embeded no works.

    What steps will reproduce the problem?

    in module extensions:

        public function sendWelcomeMessage(string $email, array $params = []): bool
        {
            $message = $this->mailer->compose(
                $this->welcomeLayout,
                [
                ],
                [
                    'signatureTextEmail' => $this->signatureTextEmail,
                    'translator' => $this->translator,
                    'file' => $this->file,
                ],
            )
                ->withFrom($this->emailFrom)
                ->withSubject($this->getWelcomeSubject())
                ->withTo($email);
    
            return $this->send($message);
        }
    
        private function send(MessageInterface $message): bool
        {
            if ($this->file !== null) {
                $message = $message->withEmbedded($this->file);
            }
    
            $result = false;
    
            try {
                $this->mailer->send($message);
                $result = true;
            } catch (Exception $e) {
                $this->logger->error($e->getMessage());
            }
    
            return $result;
        }
    

    in layout views:

    <?php $this->beginPage() ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns = 'http://www.w3.org/1999/xhtml'>
            <head>
                <meta name = 'viewport' content = 'width=device-width'>
                <meta http-equiv = 'Content-Type' content = 'text/html;charset=UTF-8'>
            </head>
            <body class = 'mailer-html-body'>
                <?= $content ?>
    
                <div class = 'mailer-html-p-content'>
                    <?= Html::img($file->cid()) ?>
                </div>
                <div>
                    <?= $signatureTextEmail ?>
                </div>
                <div>
                    <br/>
                    <strong>
                        <?= $translator->translate('mailer.html.content') ?>
                    </strong>
                </div>
            </body>
        </html>
    <?php $this->endPage() ?>
    

    What is the expected result?

    The image in the email.

    What do you get instead?

    Additional info

    | Q | A | ---------------- | --- | Version | 3.0 | PHP version | 8.0.13 | Operating system | Windows11

    type:bug 
    opened by terabytesoftw 1
Releases(2.1.0)
  • 2.1.0(Jan 2, 2023)

    • Chg #24: Raise minimal PHP version to ^8.0 (@vjik)
    • Chg #25: Raise yiisoft/mailer version to ^5.0, MessageInterface adapt to it (@vjik)
    • Enh #18: Explicitly add transitive dependencies psr/event-dispatcher and symfony/mime (@vjik)
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Jul 25, 2022)

    • Chg #13: Update the yiisoft/mailer dependency, up to ^4.0 (@thenotsoft)
    • Enh #7: Add support for version ^6.0 for symfony/mailer package (@devanych)
    Source code(tar.gz)
    Source code(zip)
Owner
Yii Software
Yii Framework and packages
Yii Software
The Mailer component helps sending emails

Mailer Component The Mailer component helps sending emails. Getting Started $ composer require symfony/mailer use Symfony\Component\Mailer\Transport;

Symfony 1.1k Jan 7, 2023
Laravel mailer which will catch all the sent emails and show them on an application view.

Laravel Web Mailer This package contains a web mailer which will catch all the sent emails. Then, you can view it visiting the route /web-inbox. The e

Creagia 54 Dec 16, 2022
Messenger mailer bundle

messenger-mailer-bundle About Install Usage Contributing About You might need to bundle if your project fulfills the following criteria: You are using

Fusonic GmbH 5 Nov 8, 2022
Magento 2 SMTP - AVADA Email Marketing Integration

SMTP Extension for Magento 2 allows the owner offer a Magento 2 store to custom SMTP (Simple Mail Transfer Protocol) server which transmits email messages. Through the SMTP server, messages will be delivered directly and automatically to the chosen customers. It offers flexible configurations with 21 different SMTP servers such as Gmail, Hotmail, O2 Mail, Office365, Mail.com, Send In Blue, AOL Mail Orange, GMX, Outlook, Yahoo, Comcast, or Custom SMTP - for your own SMTP server, etc.

Yodo1117 1 Jan 25, 2022
SlmMail is a module that integrates with various third-parties API to send mails. Integration is provided with the API of those services

SlmMail is a module that integrates with various third-parties API to send mails. Integration is provided with the API of those services

Webador 107 Dec 14, 2022
Mail application developed with Symfony 5

Fakey-Mail Mail application developed with Symfony 5! Check out the requirements for info on how to launch the app. Check out the basic functionality

Mauro 2 Jun 21, 2022
Yii2-symfonymailer - Yii 2 Symfony mailer extension.

Yii Mailer Library - Symfony Mailer Extension This extension provides a Symfony Mailer mail solution for Yii framework 2.0. For license information ch

Yii Software 28 Dec 22, 2022
Provides Amazon SES integration for Symfony Mailer

Amazon Mailer Provides Amazon SES integration for Symfony Mailer. Resources Contributing Report issues and send Pull Requests in the main Symfony repo

Symfony 49 Nov 7, 2022
Auth is a module for the Yii PHP framework that provides a web user interface for Yii's built-in authorization manager

Auth is a module for the Yii PHP framework that provides a web user interface for Yii's built-in authorization manager (CAuthManager). You can read more about Yii's authorization manager in the framework documentation under Authentication and Authorization.

Christoffer Niska 134 Oct 22, 2022
A easy way to install your basic yii projetc, we have encrypt database password in phpfile, my class with alot funtions to help you encrypt and decrypt and our swoole server install just run ./yii swoole/start and be happy!

Yii 2 Basic Project Template with swoole and Modules Yii 2 Basic Project Template is a skeleton Yii 2 application best for rapidly creating small proj

null 3 Apr 11, 2022
This extension provides Flysystem integration for the Yii framework

This extension provides Flysystem integration for the Yii framework. Flysystem is a filesystem abstraction which allows you to easily swap out a local filesystem for a remote one.

Alexander Kochetov 276 Dec 9, 2022
The Mailer component helps sending emails

Mailer Component The Mailer component helps sending emails. Getting Started $ composer require symfony/mailer use Symfony\Component\Mailer\Transport;

Symfony 1.1k Jan 7, 2023
A filterable git commit summary notification mailer

Git commit notification A symfony application to allow receiving commit notification for all commits in a certain time period. Features: Receive one m

123inkt 4 Jan 3, 2023
A fake mailer for Laravel Applications for testing mail.

MailThief MailThief is a fake mailer for Laravel applications (5.0+) that makes it easy to test mail without actually sending any emails. Note: Due to

Tighten 688 Nov 29, 2022
Zem contact reborn - An extensible HTML form mailer plugin for Textpattern CMS.

com_connect Contents Introduction Installing and upgrading Migrating from zem_contact_reborn Usage Tags com_connect tag com_connect_text tag com_conne

Textpattern CMS 23 Dec 8, 2021
Laravel mailer which will catch all the sent emails and show them on an application view.

Laravel Web Mailer This package contains a web mailer which will catch all the sent emails. Then, you can view it visiting the route /web-inbox. The e

Creagia 54 Dec 16, 2022
Messenger mailer bundle

messenger-mailer-bundle About Install Usage Contributing About You might need to bundle if your project fulfills the following criteria: You are using

Fusonic GmbH 5 Nov 8, 2022
Airbrake.io & Errbit integration for Symfony 3/4/5. This bundle plugs the Airbrake API client into Symfony project

AmiAirbrakeBundle Airbrake.io & Errbit integration for Symfony 3/4/5. This bundle plugs the Airbrake API client into Symfony project. Prerequisites Th

Anton Minin 8 May 6, 2022
Symfony React Blank is a blank symfony and react project, use this template to start your app using Symfony as an backend api and React as a frontend library.

Symfony React Blank Symfony React Blank is a blank symfony and react project, use this template to start your app using Symfony as an backend api and

Antoine Kingue 2 Nov 5, 2021
Yii 2: The Fast, Secure and Professional PHP Framework

Yii 2 is a modern framework designed to be a solid foundation for your PHP application. It is fast, secure and efficient and works right out of the bo

Yii Software 14k Dec 31, 2022