Salve a tutti dopo aver seguito la guida a quest 'indirizzo
http://rapiddg.com/blog-post/drupal-7-html-e-mail-pdf-attachments
sono riuscito ad allegare ad una mail un file pdf.(con mail system, mime mail, print pdf)
Dovrei aggiungere un altra cosa, vorrei cheil pdf allegato abbia il template che ho costruito nel file 'print--pdf.tpl.php' che si trova sotto la cartella theme/'nome theme'/templates.
Come posso chiamare la funzione che tema il pdf? (la libreria è dompdf)
Questo l'hook che ho scritto
function iscrizione_user_profile_form_submit($form, &$form_state){
$mail = '[email protected]';
module_load_include('inc', 'print_pdf', 'print_pdf.pages');
$file_content = module_invoke('print_pdf', 'generate_path', 'user/44/');
$pdf_attachment = array(
'filecontent' => $file_content,
'filename' => 'registrationstudent.pdf',
'filemime' => 'application/pdf',
);
$params = array('attachment' => $pdf_attachment);
drupal_mail('iscrizione', 'registrazione', $mail, language_default(), $params);
}
Qui ne parla esaurientemente:
http://drupal.stackexchange.com/questions/54996/how-to-use-drupal-mail-t...