• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Got "Unable to prepare arguments for mail handlers" in Plesk, command line worked

Mickel

New Pleskian
First try with this forum ;-)

Got "Unable to prepare arguments for mail handlers" in Plesk mail log, but the same script used at the command line worked fine. What's wrong?
Obsidian, latest update 18.0.41 loaded ...

Thanks a lot!
 
A new line is missing between the email header and body. Before Plesk 18.0.38, such emails were still sent via OS Sendmail, but due to logging change in Plesk 18.0.38, it is now considered a critical error and sending is stopped.
Modify website code so email will contain a new line between headers and body.
 
Wow, nice to hear from you, thank you!

I am not the best of the PHP programmers so I do not know how to teach the mb_send_mail function to do what you suggested. Even not with the help of the manual pages there. This here is my code - which works from the command line:

PHP:
// ....
$linebreaks = ["\r\n", "\n", "\r"];
$message = str_replace($linebreaks, PHP_EOL, $message);
mb_send_mail($toEmail, $subject, $message ,
    "From: <$fromEmail>\r\n" .
    "Content-type: text/plain; charset=utf-8\r\n" .
    "X-Mailer: PHP/" . phpversion());
// write success:
echo "OK";

May I ask you to give me some more details on how and where to insert that new line please? Thank you very much in advance,
Mick
 
A new line is missing between the email header and body. Before Plesk 18.0.38, such emails were still sent via OS Sendmail, but due to logging change in Plesk 18.0.38, it is now considered a critical error and sending is stopped.
Modify website code so email will contain a new line between headers and body.
Igor,
would you please provide me a code snippet which is known to work?
I'm completely lost. Is it possible to switch off this Plesk behaviour?
Thanks a lot in advance!
 
Back
Top