1

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

1 Answer 1

1

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
4
  • 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 Commented Apr 13, 2021 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. Commented Apr 16, 2021 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
    Commented Sep 2, 2021 at 14:39
  • @PhilippeAellig thanks for sharing the answer. Commented Jan 12, 2023 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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