• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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