Esempio n. 1
0
 /**
  * Send a test email.
  */
 public function postSendTest()
 {
     Output::disableBuffering();
     Messenger::setVerbose(true);
     $mailer = new Mailer(true);
     $mailer->sendBulk(Request::get('id', 'int'), true);
     exit;
 }
Esempio n. 2
0
 /**
  * Prepare headers to output a downloaded file.
  *
  * @param string $file_name
  *   The name that the browser should save the file as.
  * @param int $size
  *   The size of the content if known.
  */
 public static function download($file_name, $size = null) {
     header('Content-disposition: attachment; filename=' . $file_name);
     if ($size) {
         header('Content-Length: ' . $size);
     }
     Output::disableBuffering();
 }