If you set the variable to convert embedded images into links (variable mimemail_linkonly), then you can't attach image files - any image files added as attachments silently disappear.
I have solved the problem for myself by adding
if ($disposition == 'attachment') $linkonly = 0;
after line 167 of mimemail.inc, so that the start of _mimemail_file now reads:
function _mimemail_file($url = NULL, $content = NULL, $name = '', $type = '', $disposition = 'inline') {
static $files = array();
static $ids = array();
if ($url) {
$image = preg_match('!\.(png|gif|jpg|jpeg)$!i', $url);
$linkonly = variable_get('mimemail_linkonly', 0);
if ($disposition == 'attachment') $linkonly = 0;
// The file exists on the server as-is. Allows for non-web-accessible files.
I am not aware of the wider ramifications of that change.
Needs work
1.0
Code
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.