Browse Source

Fixed issue#348 - IMAP mail fetching stops because of broken spam email (invalid Content-Transfer-Encoding header).

Martin Edenhofer 8 years ago
parent
commit
85872a6679
4 changed files with 368 additions and 3 deletions
  1. 13 0
      CHANGES.md
  2. 21 3
      app/models/channel/email_parser.rb
  3. 324 0
      test/fixtures/mail43.box
  4. 10 0
      test/unit/email_parser_test.rb

+ 13 - 0
CHANGES.md

@@ -0,0 +1,13 @@
+# Changes
+
+## Zammad 1.1.0
+ - 2016-10-28 Implemented issue#[317](https://github.com/zammad/zammad/issues/317) - Display origin url from tweet/facebook post in article view.
+
+## Zammad 1.0.1
+ - 2016-11-03 Fixed issue#[348](https://github.com/zammad/zammad/issues/348) - IMAP mail fetching stops because of broken spam email (invalid Content-Transfer-Encoding header)
+ - 2016-10-29 Fixed issue#[326](https://github.com/zammad/zammad/issues/326) - Create emails via fetchmail / procmail.
+ - 2016-10-28 Fixed issue#[251](https://github.com/zammad/zammad/issues/251) - Page posts from facebook and tweets from twitter as tickets (new tickets from own posts / tweets will be created as closed now).
+ - 2016-10-28 Fixed issue#[323](https://github.com/zammad/zammad/issues/323) - Unable to create tickets if SLA with condition article.subject is set.
+ - 2016-10-27 Fixed issue#[268](https://github.com/zammad/zammad/issues/268) - No space at comment on ticket bulk action.
+ - 2016-10-27 Fixed issue#[313](https://github.com/zammad/zammad/issues/313) - Admin -> Channels -> Email -> Filters not shown / no name shown.
+ - 2016-10-23 Fixed issue#[277](https://github.com/zammad/zammad/issues/277) - Chat history wrong on app/page reload.

+ 21 - 3
app/models/channel/email_parser.rb

@@ -380,13 +380,15 @@ retrns
     FileUtils.mkpath path
     md5 = Digest::MD5.hexdigest(msg)
     filename = "#{path}/#{md5}.eml"
-    Rails.logger.error "ERROR: Can't process email, store it for bug reporting under #{filename}"
+    message = "ERROR: Can't process email, you will find it for bug reporting under #{filename}, please create an issue at https://github.com/zammad/zammad/issues"
+    p message # rubocop:disable Rails/Output
+    p 'ERROR: ' + e.inspect # rubocop:disable Rails/Output
+    Rails.logger.error message
     Rails.logger.error 'ERROR: ' + e.inspect
     File.open(filename, 'wb') { |file|
       file.write msg
     }
     raise e.inspect + e.backtrace.inspect
-
   end
 
   def _process(channel, msg)
@@ -624,8 +626,9 @@ retrns
 
 end
 
-# workaround to parse subjects with 2 different encodings correctly (e. g. quoted-printable see test/fixtures/mail9.box)
 module Mail
+
+  # workaround to parse subjects with 2 different encodings correctly (e. g. quoted-printable see test/fixtures/mail9.box)
   module Encodings
     def self.value_decode(str)
       # Optimization: If there's no encoded-words in the string, just return it
@@ -660,4 +663,19 @@ module Mail
       end.join('')
     end
   end
+
+  # issue#348 - IMAP mail fetching stops because of broken spam email (e. g. broken Content-Transfer-Encoding value see test/fixtures/mail43.box)
+  # https://github.com/zammad/zammad/issues/348
+  class Body
+    def decoded
+      if !Encodings.defined?(encoding)
+        #raise UnknownEncodingType, "Don't know how to decode #{encoding}, please call #encoded and decode it yourself."
+        Rails.logger.info "UnknownEncodingType: Don't know how to decode #{encoding}!"
+        raw_source
+      else
+        Encodings.get_encoding(encoding).decode(raw_source)
+      end
+    end
+  end
+
 end

+ 324 - 0
test/fixtures/mail43.box

@@ -0,0 +1,324 @@
+From 8b11391258c-c-720@example.com  Wed Nov  2 12:35:34 2016
+Return-Path: <8b11391258c-c-720@example.com>
+X-Original-To: info@example.ch
+Delivered-To: example-swiss-sales@arber.example.com
+Received: from h2.example.com (h2.example.com [85.194.241.179])
+	by arber.example.com (Postfix) with ESMTP id 84A4760187
+	for <info@example.ch>; Wed,  2 Nov 2016 12:35:34 +0100 (CET)
+MIME-Version: 1.0
+From: Paula <databases.en@example.com>
+To: info@example.ch
+X-Original-To: info@example.ch
+Reply-To: Paula <databases.en@example.com>
+Subject: Kontakte
+Date: Wed, 02 Nov 2016 09:33:14 -0400
+Precedence: bulk
+List-Unsubscribe: <mailto:unsubscribe-8b11391258c-c-720@example.com>
+Content-Type: multipart/alternative;
+	boundary="=_054230945e33091c0f5c1a08e71edcfc"
+Message-Id: <20161102133314.5737E3ABA2DE@h2.example.com>
+X-UID: 2430                                                  
+Status: RO
+Content-Length: 28457
+Lines: 299
+
+--=_054230945e33091c0f5c1a08e71edcfc
+Content-Transfer-Encoding: UTF-8
+Content-Type: text/plain; charset="UTF-8"
+
+HTML newsletter could be read here:
+
+http://business-catalogs.example.com/cmVlbHQxODsxdDE5NWIzLTcyYzhjMjAt
+
+========
+
+If you want to unsubscribe click here:
+
+http://business-catalogs.example.com/c2JudXVlcmNic2I4MWk7MTgxOTMyNS1jMmMtNzA%3D
+--=_054230945e33091c0f5c1a08e71edcfc
+Content-Transfer-Encoding: UTF-8
+Content-Type: text/html; charset="UTF-8"
+
+<style type="text/css">body { padding: 5px 5px 5px 5px; margin: 0px; background-color: #ffffff;} body, td { font-size: 12px; font-family: Arial, Verdana, sans-serif; } .Bold { font-weight: bold; } .Title { font-weight: bold; font-size: 18px; color: #cc3300; } .Code { border: #8b4513 1px solid; padding-right: 5px; padding-left: 5px; color: #000066; font-family: 'Courier New' , Monospace; background-color: #ff9933; } </style><center><table border="0" width="600"><tr><td><center>
+<table cellspacing="0" cellpadding="0" border="0" width="100%">
+    <tbody>
+        <tr>
+            <td align="center" valign="top">
+            <table cellspacing="0" cellpadding="0" border="0" width="560">
+                <tbody>
+                    <tr>
+                        <td width="560" height="10">&nbsp;</td>
+                    </tr>
+                </tbody>
+            </table>
+            <table cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" width="560" style="border-style:solid;; border-width:3px;border-color:#16b99b; border-collapse: collapse; border-spacing: 0;">
+                <tbody>
+                    <tr>
+                        <td align="center" width="560">
+                        <table cellspacing="0" cellpadding="0" border="0" width="560">
+                            <tbody>
+                                <tr>
+                                    <td align="center" width="560"><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnaWVpLGUzZHx4bnxlZWY%3D" style="border: none;"><img border="0" width="560" height="172" src="http://business-catalogs.example.com/YjhtaTsxMTE5Zzg1LTMyNztjLWNuMGFtMmlfZ2xpc2VtaWc5Mi83YWgvYTg5ckNlZWRnLy5Ic2pw" style="display: block;" alt="" /></a></td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="560">
+                            <tbody>
+                                <tr>
+                                    <td width="560" height="20">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    <p><span style="color: rgb(255, 102, 0);"><i>Geben Sie diese Information an den Direktor oder den für Marketing und Umsatzsteigerung verantwortlichen Mitarbeiter Ihrer Firma weiter!</i></span></p>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td width="520" style="border-top-style:solid; ;border-color:#c7c7c7; border-top-width:3px">
+                                    <table cellspacing="0" cellpadding="0" border="0" width="520">
+                                        <tbody>
+                                            <tr>
+                                                <td width="520" height="20">&nbsp;</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    <p>Hallo,</p>
+                                    <ul>
+                                        <li>Sie suchen nach Möglichkeiten, den Umsatz Ihre Firma zu steigern?</li><li>Sie brauchen neue Geschäftskontakte?</li><li>Sie sind es leid, Kontaktdaten manuell zu erfassen?</li><li>Ihr Kontaktdatenanbieter ist zu teuer oder Sie sind mit seinen Dienstleistungen unzufrieden?</li><li>Sie möchten Ihre Kontaktinformationen gern effizienter auf dem neuesten Stand halten?</li>                                    </ul>
+                                    <p><br />Bei uns können Sie mit nur wenigen Clicks <b>Geschäftskontakte</b> verschiedener Länder erwerben.</p>
+                                    <p>Dies ist eine <b>schnelle und bequeme</b> Methode, um Daten zu einem vernünftigen Preis zu erhalten.</p>
+                                    <p>Alle Daten werden  <b>ständig aktualisiert</b>m so dass Sie sich keine Sorgen machen müssen.</p>
+                                    <p>&nbsp;</p>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="center" width="520">
+                                    <table cellspacing="0" cellpadding="0" border="0" width="340">
+                                        <tbody>
+                                            <tr>
+                                                <td width="113"><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0LnNzdXJobGZzZWVsdGEtLm10cmVzb2YvY2VtL2xpZ25pYWlnaV9hbC9zOG1lOXgyOTdzZW1hL2VlL2xwZWxheHB4Q18ubXhzfEhsODh8Y2M%3D" style="border: none;"><img border="0" width="113" height="125" src="http://business-catalogs.example.com/YjhtaTsxMTE5Zzg1LTMyNztjLWNuMGFtMmlfZ2xpc2VtaWc5Mi83YXIvczg5ZTVlemkyXzc3ZGM3ODg3ai4yZjEwZ3A%3D" style="display: block;" alt="" /></a></td>
+                                                <td width="20">&nbsp;</td>
+                                                <td width="75"><img border="0" width="75" height="125" src="http://business-catalogs.example.com/YjhtaTsxMTE5Zzg1LTMyNztjLWNuMGFtMmlfZ2xpc2VtaWc5Mi83YXIvczg5ZTVlemlhXzc3ZGU0Yjg3ai44OTA1Z3A%3D" style="display: block;" alt="" /></td>
+                                                <td width="20">&nbsp;</td>
+                                                <td width="112"><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnaWVpLGUzZHx4bnxlZWY%3D" style="border: none;"><img border="0" width="112" height="125" src="http://business-catalogs.example.com/YjhtaTsxMTE5Zzg1LTMyNztjLWNuMGFtMmlfZ2xpc2VtaWc5Mi83YXIvczg5ZTVlemllXzc3ZGRhOTg3ai4zMGZmZ3A%3D" style="display: block;" alt="" /></a></td>
+                                            </tr>
+                                            <tr>
+                                                <td height="10">&nbsp;</td>
+                                            </tr>
+                                            <tr>
+                                                <td align="left" width="113" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                                <p style="text-align: center;"><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0LnNzdXJobGZzZWVsdGEtLm10cmVzb2YvY2VtL2xpZ25pYWlnaV9hbC9zOG1lOXgyOTdzZW1hL2VlL2xwZWxheHB4Q18ubXhzfEhsODh8Y2M%3D" class="text_link" style="font-size:15px; font-family:Arial;color:#0f7246">XLS-Muster herunterladen<br />
+                                                </a></p>
+                                                </td>
+                                                <td width="20">&nbsp;</td>
+                                                <td align="left" width="75" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">&nbsp;</td>
+                                                <td width="20">&nbsp;</td>
+                                                <td align="left" width="112" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                                <p style="text-align: center;"><a href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnaWVpLGUzZHx4bnxlZWY%3D" class="text_link" style="font-size:15px; font-family:Arial;color:#0f7246">Datenbank bestellen<br />
+                                                </a></p>
+                                                </td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td height="20">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                         <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    <p style="text-align: center;"><span style="color: rgb(255, 102, 0);"><b>Die Anmeldung ist absolut kostenlos und unverbindlich.</b> Sie können die Kataloge gemäß Ihren eigenen Kriterien filtern und ein kostenloses Datenmuster bestellen, sobald Sie sich angemeldet haben.</span><span class="new"><br />
+                                    </span></b></p>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td width="520" style="border-top-style:solid; ;border-color:#c7c7c7; border-top-width:3px">
+                                    <table cellspacing="0" cellpadding="0" border="0" width="520">
+                                        <tbody>
+                                            <tr>
+                                                <td width="520" height="20">&nbsp;</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    <p><span style="color: rgb(0, 0, 0);"> <b>Wir haben Datenbanken der folgenden Länder:</b>&nbsp;</span></p>
+                                    <table width="100%">
+                                        <tbody>
+                                            <tr>
+                                                <td>
+                                                <ul>
+                                                    <li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NUQWVpMjZ8fGEx"><span style="color: rgb(0, 0, 0);">Österreich</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NFQmVpYzR8fGNh"><span style="color: rgb(0, 0, 0);">Belgien</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NZQmVpMGJ8fDAw"><span style="color: rgb(0, 0, 0);">Belarus</span></a></li>
+ <li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NIQ2VpYjF8fGY4"><span style="color: rgb(0, 0, 0);">Schweiz</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NaQ2VpMTZ8fDc1"><span style="color: rgb(0, 0, 0);">Tschechische Republik</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NFRGVpMDl8fDM1"><span style="color: rgb(0, 0, 0);">Deutschland</span></a></li><li><a style="font-size:15px; font-fa
+ mily:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NFRWVpYTd8fGNm"><span style="color: rgb(0, 0, 0);">Estland</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NSRmVpNGN8fDBl"><span style="color: rgb(0, 0, 0);">Frankreich</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NCR2VpNjh8fDA4"><span style="color: rgb(0, 0, 0);">Vereinigtes Königreich</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="tex
+ t_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVSGVpNDB8fGQx"><span style="color: rgb(0, 0, 0);">Ungarn</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NFSWVpNDd8fGNi"><span style="color: rgb(0, 0, 0);">Irland</span></a></li>                                                </ul>
+                                                </td>
+                                                <td>
+                                                <ul>
+                                                    <li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NUSWVpOTJ8fDU3"><span style="color: rgb(0, 0, 0);">Italien</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NJTGVpNTF8fDlk"><span style="color: rgb(0, 0, 0);">Liechtenstein</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NUTGVpN2R8fDgw"><span style="color: rgb(0, 0, 0);">Litauen</span></a></l
+ i><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVTGVpNWZ8fGZh"><span style="color: rgb(0, 0, 0);">Luxemburg</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NWTGVpZWZ8fDE2"><span style="color: rgb(0, 0, 0);">Lettland</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NMTmVpOTV8fDQw"><span style="color: rgb(0, 0, 0);">Niederlande</span></a></li><li><a style="font-size:15px; font-family:Aria
+ l;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NMUGVpNGV8fDBm"><span style="color: rgb(0, 0, 0);">Polen</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NVUmVpZTV8fGVk"><span style="color: rgb(0, 0, 0);">Russland</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NJU2VpN2R8fGYz"><span style="color: rgb(0, 0, 0);">Slowenien</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://busine
+ ss-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NLU2VpNjZ8fDQ5"><span style="color: rgb(0, 0, 0);">Slowakei</span></a></li><li><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnY25pLGUsdXJ0b3NBVWVpYTd8fDNh"><span style="color: rgb(0, 0, 0);">Ukraine</span></a></li>                                                </ul>
+                                                </td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td width="520" style="border-top-style:solid; ;border-color:#c7c7c7; border-top-width:3px">
+                                    <table cellspacing="0" cellpadding="0" border="0" width="520">
+                                        <tbody>
+                                            <tr>
+                                                <td width="520" height="20">&nbsp;</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    <p style="text-align: center;"><span style="font-size: 18px;">Anwendungsmöglichkeiten für Geschäftskontakte<br />
+                                    <br />
+                                    </span></p>
+                                    <ul>
+                                        <li><i>Newsletter senden</i> - Senden von Werbung per E-Mail (besonders effizient).</li><li><i>Telemarketing</i> - Telefonwerbung.</li><li><i>SMS-Marketing</i> - Senden von Kurznachrichten.</li><li><i>Gezielte Werbung</i> - Briefpostwerbung.</li><li><i>Marktforschung</i> - Telefonumfragen zur Erforschung Ihrer Produkte oder Dienstleistungen.</li>                                    </ul>
+                                    <p>&nbsp;</p>
+                                    <p><span style="color: rgb(31, 114, 70);"><span style="font-size: 16px;">Sie können <b>Abschnitte wählen (filtern)</b> Empfänger gemäß Tätigkeitsbereichen und Standort der Firmen, um die Effizienz Ihrer Werbemaßnahmen zu erhöhen.</span></span></p>
+                                    <p>&nbsp;</p>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td width="520" style="border-top-style:solid; ;border-color:#c7c7c7; border-top-width:3px">
+                                    <table cellspacing="0" cellpadding="0" border="0" width="520">
+                                        <tbody>
+                                            <tr>
+                                                <td width="520" height="20">&nbsp;</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    <p style="text-align: center;"><span style="color: rgb(255, 0, 0);">Für jeden Kauf von <b>2016-11-05 23:59:59</b> </span></p>
+                                    <p style="text-align: center;"><span style="color: rgb(255, 0, 0);">wir gewähren <b>30%</b> Rabatt</span></p>
+                                    <p style="text-align: center;"><span style="font-size: 17px;"><span style="color: rgb(255, 0, 0);"><b>RABATTCODE: WZ2124DD</b></span></span></p>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td width="520" style="border-top-style:solid; ;border-color:#c7c7c7; border-top-width:3px">
+                                    <table cellspacing="0" cellpadding="0" border="0" width="520">
+                                        <tbody>
+                                            <tr>
+                                                <td width="520" height="20">&nbsp;</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <table cellspacing="0" cellpadding="0" border="0" width="520">
+                            <tbody>
+                                <tr>
+                                    <td align="left" width="520" valign="top" style="font-size:15px; font-family:Arial;color:#222222;line-height:19px">
+                                    
+                                    <p><span style="font-size: 15px;"><b>Bestellen Sie online bei:</b><br />
+                                    </span></p>
+                                    <p><span style="font-size: 15px;"><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="http://business-catalogs.example.com/ODtpbGs5MWIzbjUyYzExLTA4Yy06Mmg7N3AvL3R0bmFvY3B0LXlhbW9sc2Nhb3NnYy5lL3RpbXJlZi9lbS9ycnJuaWFpZXMsdGxnaWVpLGUzZHx4bnxlZWY%3D">company-catalogs.com</a><br />
+                                    </span></p>
+                                    <p><span style="font-size: 15px;"><b>Für weitere Informationen:</b><br />
+                                    </span></p>
+                                    <p><span style="font-size: 15px;">E-Mail: </span><span style="font-size: 15px;"><a style="font-size:15px; font-family:Arial;color:#0f7246" class="text_link" href="mailto:databases.en@example.com"><span style="font-size: 15px;"><b>databases.en@example.com</b></span></a></span><span style="font-size: 15px;"><br />
+                                    Telefon: +370-52-071554 (languages: EN, PL, RU, LT)</span></p>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td width="520" height="10">&nbsp;</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+            &nbsp;<br />
+            &nbsp;</td>
+        </tr>
+    </tbody>
+</table>
+</center></td></tr></table><br><center><span style="font-family: Arial;font-size:11px;color:#000000;">Unsubscribe from newsletter: <a href="http://business-catalogs.example.com/c2JudXVlcmNic2I4MWk7MTgxOTMyNS1jMmMtNzA%3D" style="color:#000000;">Click here</a></span></center><br><br>
+--=_054230945e33091c0f5c1a08e71edcfc--
+

File diff suppressed because it is too large
+ 10 - 0
test/unit/email_parser_test.rb


Some files were not shown because too many files changed in this diff