You are here

class MailgunQueueMail in Mailgun 8

Queue the email for sending with Mailgun.

Plugin annotation


@Mail(
  id = "mailgun_queue_mail",
  label = @Translation("Mailgun mailer (queued)"),
  description = @Translation("Sends the message using Mailgun with queue.")
)

Hierarchy

Expanded class hierarchy of MailgunQueueMail

File

src/Plugin/Mail/MailgunQueueMail.php, line 14

Namespace

Drupal\mailgun\Plugin\Mail
View source
class MailgunQueueMail extends MailgunMail {

  /**
   * {@inheritdoc}
   */
  public function mail(array $message) {

    // Build and queue the message.
    $mailgun_message = $this
      ->buildMessage($message);
    return $this
      ->queueMessage($mailgun_message);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MailgunMail::$logger protected property Logger.
MailgunMail::$mailgunConfig protected property Configuration object.
MailgunMail::$mailgunHandler protected property Mailgun handler.
MailgunMail::$queueFactory protected property Queue factory.
MailgunMail::$renderer protected property Renderer service.
MailgunMail::buildMessage protected function Builds the e-mail message in preparation to be sent to Mailgun.
MailgunMail::checkTracking protected function Checks, if the mail key is excempted from tracking.
MailgunMail::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
MailgunMail::format public function Formats a message prior to sending. Overrides MailInterface::format
MailgunMail::queueMessage public function Queue a message for sending.
MailgunMail::__construct public function MailgunMail constructor.
MailgunQueueMail::mail public function Sends a message composed by \Drupal\Core\Mail\MailManagerInterface->mail(). Overrides MailgunMail::mail