yiisoft/yii2-symfonymailer

More examples

PELock opened this issue · 0 comments

I think you need to add more examples for ppl migrating from swift to this mailer

I found out the default working configuration using PHP configured mailer is:

		'mailer' => [
			'class' => \yii\symfonymailer\Mailer::class,

			'transport' => [
				'host' => '',
				'scheme' => 'smtps',
				'username' => '',
				'password' => '',
				//'port' => 465,
				//'options' => ['ssl' => true],
				'dsn' => 'native://default',
			],
			'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,
		],

You cannot miss the host, scheme, dsn entries.