3

Yii2 is logging each and every mail I send as .eml file and stores into frontend\runtime\debug\mail. This folders gets very heavy and eats up all my server space. Is there anyway to stop it. I am using swift mailer.

'mailer' => [
        'class' => 'yii\swiftmailer\Mailer',
        'viewPath' => '@common/mail',
        'transport' => [
                            'class' => 'Swift_SmtpTransport',
                            'host' => 'smtp.gmail.com',
                            'username' => *******,
                            'password' => *****,
                            'port' => '465',
                            'encryption' => 'ssl',
                        ],
    ],
sphinx
  • 717
  • 1
  • 7
  • 19

2 Answers2

4

This is happening because you have got yii2-debug module switched on. You need to remove it from production server - this is designed to be used only with non-production environments for testing and debugging.

Bizley
  • 17,392
  • 5
  • 49
  • 59
1

Update yii2-debug. This bug is fixed in v2.0.15

php composer.phar update yiisoft/yii2-debug
Mike S
  • 192
  • 3
  • 9