function sendEmail() { if ($this->_status == '1') { foreach ($this->_recipients as $recipient) { if (SEND_EMAILS == '-1') { return false; } $osC_Mail = new osC_Mail($recipient['name'], $recipient['email'], STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $this->_title); $osC_Mail->setBodyHTML($this->_email_text); if ($this->hasAttachment()) { foreach ($this->_attachments as $attachment) { $osC_Mail->addAttachment($attachment[0], $attachment[1]); } } $osC_Mail->send(); } } }