, "; } else { $recipient .= $client['fullname'] ." <" . $client['email'] . ">, "; } } // Remove the last , from the recipient $recipient = rtrim($recipient,", "); // Set the vars on the object AmpacheMail::$recipient = $recipient; if(function_exists('mb_encode_mimeheader')) { AmpacheMail::$fullname = mb_encode_mimeheader($GLOBALS['user']->fullname); } else { AmpacheMail::$fullname = $GLOBALS['user']->fullname; } AmpacheMail::$to = $GLOBALS['user']->email; AmpacheMail::$subject = scrub_in($_REQUEST['subject']); if(function_exists('mb_eregi_replace')) { AmpacheMail::$message = mb_eregi_replace("\r\n", "\n", scrub_in($_REQUEST['message'])); } else { AmpacheMail::$message = scrub_in($_REQUEST['message']); } AmpacheMail::$sender = $GLOBALS['user']->email; AmpacheMail::$fromname = $fullname; AmpacheMail::send(); /* Confirmation Send */ $url = Config::get('web_path') . '/admin/mail.php'; $title = _('E-mail Sent'); $body = _('Your E-mail was successfully sent.'); show_confirmation($title,$body,$url); break; default: require_once Config::get('prefix') . '/templates/show_mail_users.inc.php'; break; } // end switch show_footer(); ?>