Drupal Mimemail missing embedded images [Solved]

A really weird bug in Drupal's Mime Mail module. This module allows you to send HTML emails with links to images and such.

Behavior

Create a newsletter, send a test one, works great.
Send it for real and the embedded images are missing.

I initially thought it was poormanscron, but I don't have that installed on this Drupal site. Basically what was happening is the first email would be the embedded image (hence it worked when you tested it) but all subsequent recipients would not get the image.

The fix is a simple change to mimemail.inc here is the diff file

  --- mimemail.inc   2009-04-01 18:09:50.000000000 +0200
  +++ mimemail.inc  2009-04-01 18:10:06.000000000 +0200
  @@ -148,6 +148,7 @@ function _mimemail_file($url = NULL, $na
 
     $ret = $files;
     $files = array();
  +  $filenames = array();
     return $ret;
   }

Credit:
http://drupal.org/node/358439#comment-1426276

Comments

Very nice, That was exactly

Very nice, That was exactly my problem, you saved me tracing this back.
You are hardcore,
Thanks :)

I appreciate the feedback...

I appreciate the feedback... That's my main objective here is to save someone else (and myself) some time fixing issues in the future.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal5>, <drupal6>, <javascript>, <php>, <sql>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options