function send_email($config) { $mailClient = new Emailer($config['options']); //var_dump($content); die; if (mb_strlen($config['content'], 'utf-8') < 1) { return 1; } //prepare email object $mailClient->clear(); //$mailClient->to(array('*****@*****.**')); $mailClient->to($config['to']); if (isset($config['bcc'])) { $mailClient->bcc($config['bcc']); } //$mailClient->to('*****@*****.**'); $mailClient->from($config['from_mail'], $config['from_title']); $mailClient->subject($config['subject']); $mailClient->reply_to('*****@*****.**', 'Pingola.ru'); $mailClient->set_mailtype('html'); $mailClient->message($config['content']); //TODO: remove all html tags and send as plain text $alt_msg = ''; //'This is the alternative message'; $mailClient->set_alt_message($alt_msg); // response if ($mailClient->send()) { return TRUE; } else { var_dump($mailClient->print_debugger()); return FALSE; } }