1
我發送了大約3000封有附件的電子郵件。基於這個原因,我使用了快速郵件反鋸齒和Throttler插件。但我得到以下錯誤:如何在yii2中使用Swift_Plugins_AntiFloodPlugin
異常「警予\基地\ UnknownPropertyException」用信息「設置未知屬性:警予\ swiftmailer \梅勒::插件」
這裏是我的主local.php在那裏我有添加插件。
'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' => 'mail.test.com',
'username' => '[email protected]',
'password' => '[email protected]',
'port' => '25',
//'encryption' => 'tls',
],
'plugins'=> [
[
'class' => 'Swift_Plugins_ThrottlerPlugin',
'constructArgs' => ['20'],
],
[
'class' => 'Swift_Plugins_AntiFloodPlugin',
'constructArgs' => [30,45],
],
],
],
感謝