cakephp-email-queue icon indicating copy to clipboard operation
cakephp-email-queue copied to clipboard

MessageId is required in order to avoid spam

Open impronta48 opened this issue 2 years ago • 0 comments

I've just discovered that exchange will consider as spam an email without a messageId.

Is there a reason why you set it to false in SenderShell.php? Line 122 my proposal is to set it to true (or not set at all to use the default)

                $sent = $email
                    ->setTo($e->email)
                    ->setSubject($e->subject)
                    ->setEmailFormat($e->format)
                    ->addHeaders($headers)
                    ->setViewVars($viewVars)
                    ->setMessageId(true)
                    ->setReturnPath($email->getFrom());

See the results of the recipt

                              X-Spam-Flag: NO
                              
                              X-Spam-Score: -2.512
                              
                              X-Spam-Level:
                              
                              X-Spam-Status: No, score=-2.512 tagged_above=-9999 required=5

               tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, DKIM_SIGNED=0.1,

               DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,

               HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, **MISSING_MID=0.497**,

               SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001]

               autolearn=ham autolearn_force=no

impronta48 avatar May 02 '23 09:05 impronta48