$mail_params = array('subject' => $settings['subject'],'message' => $settings['message'],'headers' => array('Content-Type' => 'text/html; charset=UTF-8'),'attachments' => $attachments,'voter' => $credit_app,);$mail_params['plain'] = FALSE;$mail_params['plaintext'] = $mail_params['message'];if (!empty($settings['bcc'])) {$mail_params['headers']['Bcc'] = $settings['bcc'];}$message = drupal_mail('mymodule', 'send-test', $address, $language, $mail_params, $from);
switch ($key) {case 'send-test':$message['subject'] = $params['subject'];$message['body'][] = $params['message'];$message['headers'] = array_merge($message['headers'], $params['headers']);break;}
Hi,I keep developing my module, and inside it I am sending e-mail. I am also trying to attach a file, to no avail. I have installed mimemail, I have changed mime type in my code, I have dpm'd everything. dpm gives me correct values, and the subject and body of the e-mail come through, but I couldn't get file attachment to work at all. What else can I do?Regards,PS: You can see the code at http://drupalcode.org/sandbox/Kartagis/1543120.git/blob/da47378:/pass2pdf.module#l69