Swiftmailer Time Exception yii2

2019-08-27 08:19发布

问题:

I have a yii2 project. I make sending email function on it, so I use yii2 swiftmailer. But I have a problem. Sometimes my connection is bad, so when the function is running my application will stop because the time for sending email is just 30 seconds. So, how can I handle the error exception? May be I can use try-catch, but I don't know how to use it for handle time exception.

标签: php yii2