public function perform(array $args = []): int
    {
        // Store our args
        $this->args = $args;
        unset($this->args['messages']);

        // Create a new transport
        $transport = new Swift_SmtpTransport(
            $args['smtp']['host'],
            $args['smtp']['port']
        );
        $transport->setUsername($args['smtp']['username']);
        $transport->setPassword($args['smtp']['password']);

        // Make a copy of all of our messages, and interate over each message
        $this->messages = $args['messages'];
        foreach ($messages as &$message) {
            // If shutdown is called, abort what we are doing.
            if ($shutdown) {
                break;
            }

            // Create a message
            $mailer = new Swift_Mailer($transport);
            $m = (new Swift_Message($message['subject']))
                ->setFrom([$message['from']['email'] => $message['from']['email']])
                ->setTo([$message['to']['email'] => $message['to']['name']])
                ->setBody($message['message']);
            
            // Send the message, and indicate if it was sent
            $message['sent'] = ($mailer->send($m) === 1);
        }

        return 0;
    }