0
添付ファイルに何か問題が見つかりません。電子メールは空に送信されます。 これは、drupal 7のカスタマイズされたWebフォーム用です。ここに私のコードです:Drupalのメールアドレスは空です。添付ファイルに何が問題なのですか?
<?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);
?>