You are here

function print_mail_action_submit in Printer, email and PDF versions 7.2

Same name and namespace in other branches
  1. 6 print_mail/print_mail.module \print_mail_action_submit()
  2. 7 print_mail/print_mail.module \print_mail_action_submit()

Action handler for the print_mail_action_submit.

File

print_mail/print_mail.module, line 415
Displays Printer-friendly versions of Drupal pages.

Code

function print_mail_action_submit($from, $from_name, $to, $subject, $message, $node) {
  module_load_include('inc', 'print_mail', 'print_mail');
  $form_state['values'] = array(
    'path' => 'node/' . $node->nid,
    'query' => NULL,
    'cid' => NULL,
    'title' => $node->title,
    'fld_from_addr' => $from,
    'fld_from_name' => $from_name,
    'txt_to' => array(
      'addrs' => $to,
    ),
    'fld_subject' => $subject,
    'txt_message' => $message,
    'chk_teaser' => FALSE,
  );
  $form_state['input'] = $form_state['values'];
  print_mail_form_submit(NULL, $form_state);
}