webprofil/wp-mailqueue

此包最新版本(2.1.0)没有可用的许可证信息。

安装: 377

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 2

开放问题: 2

类型:typo3-cms-extension

2.1.0 2023-01-02 07:43 UTC

This package is auto-updated.

Last update: 2024-09-18 09:18:14 UTC


README

此扩展提供了通过邮件队列从您的extbase扩展发送邮件的可能性。通常,当您通过Extbase发送邮件时,邮件会立即发送。当您的邮件提供商只允许每次发送一定数量的邮件时,这可能会与您的邮件提供商出现问题。此扩展可以帮助您解决这个问题。

工作原理

不是像这样发送邮件

$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
$mail
   ->from(new \Symfony\Component\Mime\Address('john.doe@example.org', 'John Doe'))
   ->to(
      new \Symfony\Component\Mime\Address('receiver@example.com', 'Max Mustermann'),
      new \Symfony\Component\Mime\Address('other@example.net')
   )
   ->subject('Your subject')
   ->text('Here is the message itself')
   ->send()
 ;

使用我们的类/方法

$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\WEBprofil\WpMailqueue\Domain\Model\Mail::class);
$mail->setSender(new Address($this->settings['fromMail'], $this->settings['fromName']));
$mail->setRecipient(new Address($recipient));
$mail->setSubject(LocalizationUtility::translate('mail_subject', 'my_extkey', null, $language));
$mail->setBody($html);
$mail->addAttachement($fileObject->getCombinedIdentifier());
MailqueueUtility::addToMailqueue($mail);

后端完全控制

查看wp_mailqueue的后端模块。它自我解释。在这里您可以查看已排队和已发送的邮件。您可以删除排队的邮件。

发送的调度任务

添加并激活调度任务以激活从邮件队列发送邮件:执行控制台命令mailqueue:run