0

Using Ultimate Followup Email extension for Magento 2 but throws me an error when cron is trying to send out emails:

main.CRITICAL: Error when running a cron job {"exception":"[object] (
RuntimeException(code: 0): Error when running a cron job at /home/*/public_html/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:330,
Error(code: 0): Call to a member function setMessageType() on null at /home/*/public_html/app/code/Magenest/UltimateFollowupEmail/Model/Mail/TransportBuilder.php:142)"} []

This is code from the TransportBuilder.php part around line 142, maybe something isn't working because I'm using PHP 7.3? It says the line with text/html is throwing an error.

/* Prepare message */
protected function prepareMessage()
{
    $this->message->setMessageType('text/html');
    $template = $this->getTemplateChoosed($this->templateId);
    $body = $template->processTemplate();
    $this->message->setBodyHtml($body);

    $this->message->setSubject(html_entity_decode($template->getSubject(), ENT_QUOTES));
    return $this;
}

You can find this module on Github to look further in the code.

[UPDATE]

Fix can be found here. https://github.com/magenest-dev/module-ultimate-follow-up-email/pull/2/commits/4779cf27cf1bfec04d8ac9b02d7a43fbcf625ee4

5
0

i was not able to contact magenest to merge my pull request. today i fixed another bug in the module. you can use my repository with composer. just add my repository to your composer.json file. then, composer will load my repo instead of the original magenest repository. run composer update magenest/module-ultimate-follow-up-email to use the latest release (today v100.3.3) with the latest fixes.

composer config repositories.followupemail vcs https://github.com/philippeaellig/module-ultimate-follow-up-email
3
  • Hi guys, so Philippe, your fix will solve the problem mentioned by sebbie with function setMessageType() on null ? there are any other additional changes for this problem, or only your changes? Thanks Apr 13 at 14:10
  • Yes, my pull request will fix the problem. but my one-year-old pull request is not merged yet... and maybe, there are new problems with the latest magento version and php 7.4. so... but in august 20, my fix solved the problem. Apr 16 at 10:10
  • Hi @PhilippeAellig , thanks for your contribution. I have some issues with the abandoned cart emails that are being sent. The product prices are excluding TAX (should be including) and the links attached to the product images go to a url that goes something like domain.com/admin/catalog/product/view/id/... this is of course wrong. I have added your repository.
    – sebbie
    Sep 2 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.