webprofil/wp-mailqueue

There is no license information available for the latest version (2.1.0) of this package.

Installs: 248

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 2

Open Issues: 2

Type:typo3-cms-extension

2.1.0 2023-01-02 07:43 UTC

This package is auto-updated.

Last update: 2024-04-18 08:19:23 UTC


README

This extension offers the possibility, to send mails from your extbase extension via a Mailqueue. Usually, when you send mails via Extbase, the Mails are sent immediately. This can run into problems with your mailprovider, when he allows only a specific amount of mails per time. This extensions help you with this problem.

How does it work

Instead of sendin Mails like this:

$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()
 ;

Use our Class/Method:

$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);

Full control in the Backend

Take a look into the Backend module of wp_mailqueue. It is self explained. Here you can have a look to the queued and sent mails. You can delete queued mails.

Scheduler Tasks for sending

Add and activate the Scheduler Task to activate the Mailsending from the mailqueue: Execute console commands mailqueue:run