• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

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