I'm trying to send static attachments with webform module and mimemail.
I chose mimemail sender in webform configuration. I created a simple module to hook mail function in which I wrote this:
$attachment = array( 'filecontent' => file_get_contents('themes/files/conditions.pdf'), 'filename' => 'conditions.pdf', 'filemime' => 'application/pdf', 'filepath' => 'themes/files/conditions.pdf', ); $message['params']['attachments'] = $attachment;
Result: unable to send mail. I'm not sure that mimemail works fine with webform? I tried to install SwiftMailer, but no way.
Has someone an idea to resolve this issue?