*

elbPV

  • *
  • 3 posts
Empty E-Mails ...
« on: June 02, 2025, 04:37:46 PM »
Hi,

we are currently testing OsClass 8.3.0 for a little internal intranet purpose; everything is fine except e-mails: All e-mails like contact form or our own function using osc_sendMail sends e-mails out with correct subject/title but no content. We've checked multiple clients to ensure there is no view problem and multiple $body versions (HTML, Text-only) with same results: Empty e-mail body.

Here is an example of our e-mail function:


function email_on_new_item_osclass() {

        $subject = 'New item added ';
   $body = 'Test E-Mail';
   
    $emailParams = array(
   'subject' => $subject,      
        'to' => '[email protected]',     
   'to_name' => 'xxxx',
        'body' => $body,
        'alt_body' => $body);

    osc_sendMail($emailParams);
}

osc_add_hook('posted_item', 'email_on_new_item_osclass');


(Sorry for posting not as code block - i got an error that i cannot post external links if i use it)


After some further tests we found the same problem using the contact form - correct subjects but empty e-mail bodies. So it seems this issue is system related. Our system:

PHP version: 8.2.27
MySQL version: 11.7.2-MariaDB-ubu2404

Any ideas why our OsClass always sends empty e-mail bodies?

Many thanks,
Erik

*

MB Themes

Re: Empty E-Mails ...
« Reply #1 on: June 02, 2025, 05:07:28 PM »
1. check if you have email templates correctly defined in Settings > Email templates
2. try with different mail server
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

elbPV

  • *
  • 3 posts
Re: Empty E-Mails ...
« Reply #2 on: June 03, 2025, 10:12:58 AM »
Good morning,

thanks for your answer - if we use "Test it" with some of the templates the problem ist the same: Correct subject but empty email body ...

Some more details of our mail configuration: We use the M365 Direct Send Feature for OsClass without authentication. This is used by other services like monitoring etc. without this issues. Seems that OsClass missformat the outgoing emails...?

Any further ideas to resolve it?

Many thanks,
Erik

*

elbPV

  • *
  • 3 posts
Re: Empty E-Mails ...
« Reply #3 on: June 03, 2025, 11:04:11 AM »
Ok, it seems it's M365 related - changed mail server configuration to my own and now the emails are correct. Any idea why this happens in M365?

Many thanks,
Erik

*

MB Themes

Re: Empty E-Mails ...
« Reply #4 on: June 03, 2025, 02:39:56 PM »
Never used it in this way, they might require some extra approval or setup (like gmail) when used as application email.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots