# erp/1.6.7/modules/accounting/includes/classes/class-send-email.php

ERP: Complete HR, Accounting &amp; CRM Suite Built for WooCommerce, version 1.6.7. 30 lines.

- Page: https://pluginprobe.com/plugins/erp/1.6.7/code/modules/accounting/includes/classes/class-send-email.php
- Raw: https://pluginprobe.com/plugins/erp/1.6.7/raw/modules/accounting/includes/classes/class-send-email.php
- Modified: 2020-10-29T12:26:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/erp/1.6.7/code/modules/accounting/includes/classes/class-send-email.php#L10-L20`.

```php
<?php

namespace WeDevs\ERP\Accounting\Includes\Classes;

use WeDevs\ERP\Email;

class Send_Email extends Email {
    public function __construct() {
        parent::__construct();
    }

    public function trigger( $receiver_emails, $subject = 'Default subject', $body = 'Default body', $attachment = '' ) {
        $results = [];

        if ( is_array( $receiver_emails ) ) {
            foreach ( $receiver_emails as $email ) {
                $results[] = $this->send( $email, $subject, $body, '', $attachment );
            }
        } else {
            $results[] = $this->send( $receiver_emails, $subject, $body, '', $attachment );
        }

        if ( in_array( false, $results, true ) ) {
            return false;
        }

        return true;
    }
}

```
