ME020587 - TRB: Messages sent via PHP script are rejected by remote servers.


The following example error will be logged within the MailEnable SMTP log files when sending via a PHP script using the send mail function.

MAIL FROM:<My Name <> SIZE=698

550 5.1.2 Sender rejected.


This is because the PHP mail function has not been configured to use the "additional parameters" to set the envelope sender of the message. If additional parameters within the PHP mail function are not specified then the message FROM header within the message will be used during the SMTP conversation which it most cases is not suitable since it may contain more than just the email address. If the message FROM header contains a friendly name it will use this within the SMTP conversation FROM command and embrace the friendly name and SMTP address within <> brackets which violates the RFC standard.


The following PHP example shows the additional parameter within the PHP mail function that can be used as reference:

<?php mail("", "the subject", $message, "From:", ""); ?> 




Product:MailEnable (All Versions)
Keywords:php script 550 mail from function
Class:TRB: Troubleshooting (Configuration or Environment)
Revised:Wednesday, May 4, 2016