Closed (fixed)
Project:
Mime Mail
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 May 2010 at 09:41 UTC
Updated:
1 Apr 2011 at 15:29 UTC
Hello,
I am trying to send a file attachment (x.pps) using the mimemail module, but I don't really know why isnt it working. Here is my code:
$att[]=array(
'filepath' => '/home/loftyf01/public_html/newsletter/x.pps',
'filemime' => 'application/vnd.ms-powerpoint',
);
mimemail($from, $mail, $subject, $body, FALSE, $headers = array(), $text = NULL, $att );
this isnt working either: (I've placed the file in sites/default/files/hirlevel/ too, so thats not the error I guess)
$att[0]=array(
'filepath' => file_directory_path().'/newsletter/x.pps',
'filemime' => 'application/vnd.ms-powerpoint',
);
Whats wrong with this? Should the path be relative or absolute? I've tried with both but none of them worked so far.
Thanks in advance.
Comments
Comment #1
sgabe commentedThe path should be a relative Drupal path.
In your case I think:
Comment #2
Robbert commentedIf you really need absolute paths you may take a loot at the patch in #760080: Attachments specified with absolute local paths are not added.
Comment #3
simon georges commentedShouldn't you add the
'list' => 1key to the attachment table ?Comment #4
sgabe commentedNot necessary, since there was a modification to take 'list' into account only if it is set.
Comment #5
sgabe commentedNow I'm closing this issue, since there was some improvement in sending attachments.