Skip to content

Setting unknown property: yii\swiftmailer\Mailer:: transport #11134

@gb5256

Description

@gb5256

Hi,
I am using yii advanced template, all up to date with latest commits.
Afer enabling swiftmailer, I get this error message

Setting unknown property: yii\swiftmailer\Mailer:: transport

the main-local.conf is like this:

    'mailer' => [
        'class' => 'yii\swiftmailer\Mailer',
        'viewPath' => '@common/mail',
        // send all mails to a file by default. You have to set
        // 'useFileTransport' to false and configure a transport
        // for the mailer to send real emails.
       'useFileTransport' => false,
       ' transport' => [
            'class' => 'Swift_SmtpTransport',
            'host' => 'smtp.gmail.com',  // e.g. smtp.mandrillapp.com or smtp.gmail.com
            'username' => 'mail@asf.com',
            'password' => 'secret',
            'port' => '587', // Port 25 is a very common port too
            'encryption' => 'tls', // It is often used, check your provider or mail server specs
        ],
    ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions