Fixed issue #2252 - Unable to process email "ERROR: #<NoMethodError: undefined method match' for nil:NilClass>"`.

This commit is contained in:
Martin Edenhofer 2018-09-24 11:21:30 +02:00
parent e6f434328d
commit 1568909afb
3 changed files with 49 additions and 1 deletions

View file

@ -387,7 +387,7 @@ cleanup html string:
end end
uri.to_s uri.to_s
rescue URI::Error rescue
url url
end end

View file

@ -0,0 +1,17 @@
From: =?Windows-1252?Q?Hans_B=C4KO?= =?iso-8859-15?q?Sch=F6nland?= <me@bogen.net>
To: =?iso-8859-2?Q?Namedy=F1ski?= (hans@example.com)
Subject: test email
Content-Type: text/html; charset="iso-8859-15"; format=flowed
<html>
<div>test 123</div>
<strong style=3D"font-weight:600;">Demande :</strong>
<br> Bonjour
Je viens de vous appeler pour demander, si possible, un alignement de votre prix avec un autre site.
Si c'est possible je pourrai valider ma commande de 2 articles.
merci
https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&amp;gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&amp;sort=3D0&amp;xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&amp;ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&amp;ptnrid=3DszR8w9fp2_dc|pcrid|65341408643|pkw||pmt|&amp;ja2=3Dtsid:67590|cid:351274283|agid:16928404283|tid:pla-79136332043|crid:65341408643|nw:g|rnd:17449719988904880623|dvc:c|adp:1o3</font>
</html>

View file

@ -0,0 +1,31 @@
--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
from: '"Hans BÄKOSchönland" <me@bogen.net>'
from_email: me@bogen.net
from_display_name: Hans BÄKOSchönland
to: Namedyński (hans@example.com)
subject: test email
body: |-
<div>test 123</div><strong>Demande :</strong>
<br> Bonjour Je viens de vous appeler pour demander, si possible, un alignement de votre prix avec un autre site. Si c'est possible je pourrai valider ma commande de 2 articles. merci <a href="https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&amp;gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&amp;sort=3D0&amp;xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&amp;ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&amp;ptnrid=3DszR8w9fp2_dc" rel="nofollow noreferrer noopener" target="_blank">https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&amp;gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&amp;sort=3D0&amp;xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&amp;ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&amp;ptnrid=3DszR8w9fp2_dc</a>|pcrid|65341408643|pkw||pmt|&amp;ja2=3Dtsid:67590|cid:351274283|a<a href="gid:16928404283" rel="nofollow noreferrer noopener" target="_blank">gid:16928404283</a>|tid:pla-79136332043|crid:65341408643|nw:g|rnd:17449719988904880623|dvc:c|adp:1o3
content_type: text/html
attachments:
- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
data: |
<html>
<div>test 123</div>
<strong style=3D"font-weight:600;">Demande :</strong>
<br> Bonjour
Je viens de vous appeler pour demander, si possible, un alignement de votre prix avec un autre site.
Si c'est possible je pourrai valider ma commande de 2 articles.
merci
https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&amp;gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&amp;sort=3D0&amp;xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&amp;ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&amp;ptnrid=3DszR8w9fp2_dc|pcrid|65341408643|pkw||pmt|&amp;ja2=3Dtsid:67590|cid:351274283|agid:16928404283|tid:pla-79136332043|crid:65341408643|nw:g|rnd:17449719988904880623|dvc:c|adp:1o3</font>
</html>
filename: message.html
preferences: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
content-alternative: true
original-format: true
Mime-Type: text/html
Charset: iso-8859-15