• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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