public function send($send_to, $body, $title=null)
    {
        $sender = static::getSender();
        
        $tos = StringHelper::toArray($send_to);
        foreach ($tos as $email) {
            $sender->addTo($email);
        }
        
        $subject = $title;
        if ($title) {
            if (strlen($title) > strlen($body)) {
                $subject = $body;
                $body = $title;
            }
        } else {
            $subject = StringHelper::str_cut($body, 15);
        }
        
        $res = $sender->setSubject($subject)->setBody($body, true)->send();
        
        if (!$res) {
            return ErrorInfo::error('mail send error, check error log');
        }
        
        return ErrorInfo::success('mail send success');
    }
public function send($send_to, $body, $title=null)
    {
        $sender = static::getSender();
        
        $tos = StringHelper::toArray($send_to);
        foreach ($tos as $email) {
            $sender->addTo($email);
        }
        
        $subject = $title;
        if ($title) {
            if (strlen($title) > strlen($body)) {
                $subject = $body;
                $body = $title;
            }
        } else {
            $subject = StringHelper::str_cut($body, 15);
        }
        
        $res = $sender->setSubject($subject)->setBody($body, true)->send();
        
        if (!$res) {
            return ErrorInfo::error('mail send error, check error log');
        }
        
        return ErrorInfo::success('mail send success');
    }
public function send ( $ send_to , $ body , $ title = null ) { $ sender = static :: getSender ( ) ; $ tos = StringHelper :: toArray ( $ send_to ) ; foreach ( $ tos as $ email ) { $ sender -> addTo ( $ email ) ; } $ subject = $ title ; if ( $ title ) { if ( strlen ( $ title ) > strlen ( $ body ) ) { $ subject = $ body ; $ body = $ title ; } } else { $ subject = StringHelper :: str_cut ( $ body , 15 ) ; } $ res = $ sender -> setSubject ( $ subject ) -> setBody ( $ body , true ) -> send ( ) ; if ( ! $ res ) { return ErrorInfo :: error ( 'mail send error, check error log' ) ; } return ErrorInfo :: success ( 'mail send success' ) ; }
send one or more

@param  mixed  $send_to string|array
@param  string $body
@param  string $title

@return \Wslim\Common\ErrorInfo
send one or more