src/Plugins/AbstractPlugin.php
protected function getSwiftMailer()
    {

        // the swift mailer configuration
        if ($swiftMailerConfiguration = $this->getPluginConfiguration()->getSwiftMailer()) {
            // load the factory that creates the swift mailer instance
            $factory = $swiftMailerConfiguration->getFactory();
            // create the swift mailer instance
            return $factory::factory($swiftMailerConfiguration);
        }
    }
protected function getSwiftMailer()
    {

        // the swift mailer configuration
        if ($swiftMailerConfiguration = $this->getPluginConfiguration()->getSwiftMailer()) {
            // load the factory that creates the swift mailer instance
            $factory = $swiftMailerConfiguration->getFactory();
            // create the swift mailer instance
            return $factory::factory($swiftMailerConfiguration);
        }
    }
Return's the configured swift mailer instance.

@return \Swift_Mailer|null The mailer instance