framework/mail/BaseMailer.php
public function afterSend($message, $isSuccessful)
    {
        $event = new MailEvent(['message' => $message, 'isSuccessful' => $isSuccessful]);
        $this->trigger(self::EVENT_AFTER_SEND, $event);
    }
public function afterSend($message, $isSuccessful)
    {
        $event = new MailEvent(['message' => $message, 'isSuccessful' => $isSuccessful]);
        $this->trigger(self::EVENT_AFTER_SEND, $event);
    }
This method is invoked right after mail was send.
You may override this method to do some postprocessing or logging based on mail send status.
If you override this method, please make sure you call the parent implementation first.
@param MessageInterface $message
@param bool $isSuccessful