Code Duplication    Length = 7-7 lines in 2 locations

catalog/admin/includes/modules/newsletters/newsletter.php 1 location

@@ 105-111 (lines=7) @@
102
        'customers_newsletter' => '1'
103
      ]);
104
105
      while ($Qmail->fetch()) {
106
        $newsletterEmail->clearTo();
107
108
        $newsletterEmail->addTo($Qmail->value('customers_email_address'), $Qmail->value('customers_firstname') . ' ' . $Qmail->value('customers_lastname'));
109
110
        $newsletterEmail->send();
111
      }
112
113
      $OSCOM_Db->save('newsletters', [
114
        'date_sent' => 'now()',

catalog/admin/mail.php 1 location

@@ 66-72 (lines=7) @@
63
      $customerEmail->setBodyHTML($_POST['message_html']);
64
    }
65
66
    while ($Qmail->fetch()) {
67
      $customerEmail->clearTo();
68
69
      $customerEmail->addTo($Qmail->value('customers_email_address'), $Qmail->value('customers_firstname') . ' ' . $Qmail->value('customers_lastname'));
70
71
      $customerEmail->send();
72
    }
73
74
    OSCOM::redirect(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to));
75
  }