Swiftmailer error log

Hi guys, Swiftmailer will just return Boolean if sending mail won’t be succesfull

-for instance if receiver is unknown.

As I intend to protocoll my mails being sent, I’d get further informations about error.

Any ideas, how to use Swiftmailer in order to get information about sending mails in case of error(s)?

errors get logged in your @runtime/logs/app.log also if you would like to debug your email you can log your emails to file using the file transport here is a example config by default it will save your messages to @runtime/mail directory.


'mailer' => [

    'class' => 'yii\swiftmailer\Mailer',

    'useFileTransport' => true

],

http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html#testing-and-debugging

I have read this article,of course. I need informations in this log for my database.

For instance, I have attribute in my table being filled in what kind of mailing error had occured while sending.

So, it will be more complicated,as I thought, won’t it? I have to investigate file in frontend/runtime/mail respectively frontend/runtime/logs. That’s a lot of effort for one single attribute