public function init()
{
parent::init();
if ($this->blocking) {
throw new NotSupportedException(Yii::t('app', 'MailQueue does not support blocking.'));
}
$this->subscriptionQueue = Instance::ensure($this->subscriptionQueue, 'nineinchnick\\nfy\\components\\QueueInterface');
$this->mailer = Instance::ensure($this->mailer, 'yii\\mail\\MailerInterface');
if (!is_callable($this->recipientCallback)) {
throw new InvalidConfigException(Yii::t('app', 'MailQueue requires a valid callback for recipientCallback.'));
}
if ($this->composeCallback === null) {
$this->composeCallback = [$this, 'createMessage'];
}
}