diff --git a/easy_unsubscribe.php b/easy_unsubscribe.php
index b6a4a22..7a7d5fa 100644
--- a/easy_unsubscribe.php
+++ b/easy_unsubscribe.php
@@ -29,16 +29,11 @@ class easy_unsubscribe extends rcube_plugin
$this->message_headers_done = true;
$ListUnsubscribe = $p['headers']->others['list-unsubscribe'];
-
- preg_match('%\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))%i', $ListUnsubscribe, $UnsubURL);
- preg_match('/mailto:(.*?)>/', $ListUnsubscribe, $UnsubEmail);
-
- if(!empty($UnsubURL[0]))
- $this->unsubscribe_img = '';
-
- if(!empty($UnsubEmail[1]))
- $this->unsubscribe_img .= '';
-
+ if ( preg_match_all('/<(.+)>/mU', $ListUnsubscribe, $items, PREG_PATTERN_ORDER) ) {
+ foreach ( $items[1] as $uri ) {
+ $this->unsubscribe_img .= '';
+ }
+ }
}
if(isset($p['output']['subject']))