Add attachments to mail
Try this code. I'm using it with backup and migrate module

$module = 'backup_migrate';
$key = microtime();
$language = language_default();
$params = array();
$params['attachments'][] = array(
  'filepath' =&gt; $attachment-&gt;path,
  'filecontent' =&gt; 'My attachment.',
  'filename' =&gt; $attachment-&gt;filename,
  'filemime' =&gt; 'text/plain',
);

$from = $mail-&gt;from;

$send = FALSE;
$message = drupal_mail($module, $key, $to, $language, $params, $from, $send);

$message['subject'] = t('Database backup from !site: !file', array('!site' =&gt; variable_get('site_name', 'drupal'), '!file' =&gt; $attachment-&gt;filename));
$message['body'] = t('Database backup attached.') ."\n\n";

// Retrieve the responsible implementation for this message.
$system = drupal_mail_system($module, $key);

// Format the message body.
$message = $system-&gt;format($message);

// Send e-mail.
$message['result'] = $system-&gt;mail($message);