R
R
Ravenenok2016-06-16 11:12:57
Yii
Ravenenok, 2016-06-16 11:12:57

Yii2 Very long mail sending via swiftmailer?

Sending each email takes about 5 seconds. At the same time, sending mail not through yii from this server is many times faster.
Sending is configured as follows. What can be wrong?

'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@app/mail/',
            'useFileTransport' => false,
            'transport' => [
                'class' => 'Swift_SmtpTransport',
                'host' => 'x.x.x.x',  
                'username' => '',
                'password' => '',
                'port' => '25', 
                'encryption' => '', 
            ],
            'messageConfig' => [
                'from' => ['[email protected]' => 'Email']
            ],
        ],

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DuD, 2016-06-16
@DuD

I think the problem is that he has to raise a connection for each letter and communicate with the smtp server, and this is not a fast business.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question