You are here

function print_mail_action_submit in Printer, email and PDF versions 7

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

Action handler for the print_mail_action_submit

File

print_mail/print_mail.module, line 735
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,
    'cid' => NULL,
    'query' => NULL,
    'title' => $node->title,
    'fld_from_addr' => $from,
    'fld_from_name' => $from_name,
    'txt_to_addrs' => $to,
    'fld_subject' => $subject,
    'txt_message' => $message,
    'chk_teaser' => FALSE,
  );
  print_mail_form_submit(NULL, $form_state);
}