public function perform(array $args = []): int
    {
        // Create a transport
        $transport = new Swift_SmtpTransport(
            $args['smtp']['host'],
            $args['smtp']['port']
        );
        $transport->setUsername($args['smtp']['username']);
        $transport->setPassword($args['smtp']['password']);
      
        // Create a message
        $mailer = new Swift_Mailer($transport);
        $message = (new Swift_Message($args['subject']))
            ->setFrom([$args['from']['email'] => $args['from']['email']])
            ->setTo([$args['to']['email'] => $args['to']['name']])
            ->setBody($args['message']);
        
        // Send the message
        $result = $mailer->send($message);

        // The email was successfully sent if $mail->send returns 1, indicating 1 email was sent
        return $result === 1;
    }