]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5909 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 May 2023 09:29:45 +0000 (11:29 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 May 2023 09:29:45 +0000 (11:29 +0200)
app/Mail/FluidbookQuoteReceived.php
resources/emailconfig/spamassassin-rules.cf

index 8e5d2ae471445e177f2a7ee709097702687e9284..d9f642fb6e1e94ce79709cf0f2b87a943fe52dc4 100644 (file)
@@ -10,11 +10,17 @@ class FluidbookQuoteReceived extends Base
 
     public function setData($post)
     {
-        $this->from($post['email'], $post['prenom'] . ' ' . $post['nom']);
+
+        $this->replyTo($post['email'], $post['prenom'] . ' ' . $post['nom']);
+        $this->from('tech@fluidbook.com');
         $this->to('tech@fluidbook.com');
         $spam = '';
         if ($post['spam'] === 'Oui') {
             $spam = ' *** SPAM ***';
+            $this->withSwiftMessage(function ($message) {
+                $headers = $message->getHeaders();
+                $headers->addTextHeader('X-Fluidbook-SPAM', '1');
+            });
         }
         $this->subject('[Fluidbook Workshop]' . $spam . ' Demande de devis');
 
@@ -28,6 +34,11 @@ class FluidbookQuoteReceived extends Base
         $this->html($converter->convertToHtml($markdown));
     }
 
+    public function build()
+    {
+        return parent::build();
+    }
+
     public static function getMarkdown($post, $footer = '')
     {
         $fields = array(
index a94915e93f0136ee3f4d87d0e4904217eb9d89c4..8cee04f9f536bf001f6c9080dcc75a14207460ee 100644 (file)
@@ -19,8 +19,12 @@ score BAYES_95          3.1
 score BAYES_99          3.5
 score BAYES_999         10.5
 
-# TXRep
+# Workshop rules
+header X_FLUIDBOOK_SPAM                        exists:X-Fluidbook-SPAM
+describe X_FLUIDBOOK_SPAM                      Message has been marked as SPAM by Fluidbook
+score X_FLUIDBOOK_SPAM      110.0
 
+# TXRep
 loadplugin Mail::SpamAssassin::Plugin::TxRep
 ifplugin Mail::SpamAssassin::Plugin::TxRep
 use_txrep 1