Notice: "Empty message body" on thank you page

  • gcom
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 83
  • Thank you received: 0

gcom created the topic: Notice: "Empty message body" on thank you page

Hi,
I have a form, that sends a mail back to an email address that was entered in the form. Because the mailback email contains an attachment, I've set it up as a submit piece of my form: Submit pieces -> End Submit
At the end I want to redirect to my thank you page, so I just appended the code to redirect at the end (see below)....
Everything seems to work fine, but on my thank you page I get a notice: "Empty message body". I found the string in the Joomla language plugin, it belongs to the PHPMAILER_EMPTY_MESSAGE constant.
Email notification is not enabled and the mailback email is sent properly.
How do I properly redirect to my thank you page, after sending my mailback email?
$this->execPieceByName('ff_InitLib');
$from = 'no-reply@mydomain.com';
$fromname =  'some from name';
$subject = 'my subject';
$isHtml = true;

$mailbody ='';
$mailbody .= '
<html>
<body>
.
.
.
$this->sendMail($from, $fromname, $email, $subject, $mailbody, $attachment, $isHtml); 
JFactory::getApplication()->redirect('/my-thank-you-page');
#233977
  • Posts: 2109
  • Karma: 72
  • Thank you received: 269

mihaela replied the topic: Notice: "Empty message body" on thank you page

Hello,

Please try to clear cache.
Go to Joomla > System. Clear Cache and Clear Expired Cache.
Check if you are running Joomla Cache on your website .
You can check it System > Global Config. > System > Cache Settings > System Cache > and set it to "Off".
If you were using Cache so far, try to disable it / delete your cache and try to re-submit the form.

Let me know whether that changed anything.

Also, try to put the absolute path to the thank you page in:
JFactory::getApplication()->redirect('/my-thank-you-page');

Let me know the results.

Regards,

Mihaela
#233997
  • gcom
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 83
  • Thank you received: 0

gcom replied the topic: Notice: "Empty message body" on thank you page

Hello Mihaela,
unfortunately this didn't have any effect: I usually don't use Joomlas' cache, since Breezingforms doesn't play well with it, so on this site too, caching is disabled. Despite this, I emptied chache and expired cache, as you suggested, but with no effect.
I also tried using a full path in the redirect, even like mydomain.de/my-thank-you-page , but no luck here either...
When I call the url of my thank you page directly, the message is not displayed.
I found the solution though:
In "Advanced -> More Options -> Mailback Emails" I had it set to "custom" and the alternative from name and the custom email subject were filled in from earlier tests. Deleting their content and resetting it from "custom" to "default" did the trick.
Best Regards
Markus
#234046
  • Posts: 2109
  • Karma: 72
  • Thank you received: 269

mihaela replied the topic: Notice: "Empty message body" on thank you page

Hello,

I'm glad that you have managed to resolve the issue.

That was the next thing I meant to ask you, whether you have Edit email set to "Custom" with no content there because that would cause the error message you had.

I'm glad that the issue is resolved and that it is now working as you wanted.

Regards,

Mihaela
#234048
Moderators: ForumSupporttomeperica
Time to create page: 0.033 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here