0
Ich kann nicht finden, was mit dem Anhang falsch ist. Die E-Mail wird leer gesendet. Dies ist für drupal 7 angepasste Webform. Hier ist mein Code:Drupal E-Mail ist leer. Was stimmt nicht mit meiner Bindung?
<?php
module_load_include('inc', 'print_pdf', 'print_pdf.pages');
$file_content = module_invoke('print_pdf', 'generate_path', '/****.pdf');
$attachment = array(
'filecontent' => $file_content,
'filename' => '****.pdf',
'filemime' => 'application/pdf',
'list' => TRUE
);
$message = array(
'headers' => array('Content-Type' => 'text/html'),
'key' => 'test',
'to' => '****@****.com',
'from' => '****@****.com',
'attachments' => $attachments,
'subject' => 'Test email',
'body' => 'test'
);
$system = drupal_mail_system('mimemail', 'test');
$system->format($message);
$result = $system->mail($message);
?>