Closed (won't fix)
Project:
Mime Mail
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2009 at 08:16 UTC
Updated:
22 Jan 2011 at 14:09 UTC
warning when sending newsletter:
* warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in mimemail.module on line 398.
also described here:
http://drupal.org/node/513380
Comments
Comment #1
krabbe commentedIt's a 6.x-issue, no?
Comment #2
tecum commentedI am having this issue in 5.x-1.0.
In my module I am calling the mimemail(...) function to send an email with attachemts although I would not need html-/styled emails.
The emails always got sent but caused this error messsage in the watchdog.
I solved it by adding an empty mail.css in the themes folder of the admin theme (garland) (the mails got sent by clicking a button in the admin view).
Comment #3
argosmm commentedThanks Silvan I have this problem 1 year and I don't use this module simplenews.
Comment #4
mo6Indeed, adding an empy mail.css in the theme directory solved the problem for me too. Still, this error should be handled by the module.
Comment #5
benwei commentedI see this on 5.x-1.0 also. It looks like it's due to this code:
If the returned value from drupal_get_css() has a trailing newline, when we split by newline, we end up with a final empty filename.
I just wrapped the call to preg_replace() in a trim() to strip leading/trailing whitespace and all is good now.
Comment #6
freedayum commentedbenwei, thanks,that seems to fix the empty-file issue.
Would anybody let me know when does a newsletter gets sent?, does it get sent when a newsletter is created and evertime when it's edited?.
I have the selected the 'Send newsletter' option ( under Default selection for sending newsletters:) , but I don't see any newsletters to the test email-ids I have set.
Comment #7
dex002 commentedtrim() worked for me too, nice fix - thanks
Comment #8
sgabe commentedClosing issue, Drupal 5 is no longer officially supported.