以下のコードを使用して特定の電子メールで添付ファイルを送信していますが、どういうわけか機能していません。事前に感謝します
$body = "test body with attachments";
$subject = "My test message";
$attachments[]=array(
'filepath' => file_directory_path().'/document.pdf',
'filename' => 'wonderful.pdf',
'filemime' => 'application/pdf',
);
mimemail("xxxxx@gmail.com", "xxxxxx2@gmail.com", $subject, $body, NULL, array(), NULL, $attachments,'');