Project:Simplenews
Version:5.x-1.5
Component:Usability
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

A client is claiming that their newsletter is not being delivered to all recipients. I checked the log for 'newsletter' and there are a lot of messages like

Newsletter {newsletter title} could not be sent to {recipient email address}.

I figured that there was a problem with Simplenews, and then found this in the log for 'Simplenews':

Outgoing email via mimemail.
Subject: {newsletter title}
Recipient: {recipient email address}

And the ones that seemingly didn't go out were seemingly sent out. I'm at a bit of a loss regarding how to troubleshoot this. Naturally, one of the site owners happens to be one who is not receiving the emails though I get them fine. They claim to have checked their spam folder and the newsletters are not there. How can I troubleshoot this? Thanks!

Comments

#1

In the Drupal/php side this is all you can debug. Check with their webhost if they have any maillogs. While you'r there if they have any mail restrictions (I.e. Max mails per hour, etc). It is likely that you have hit one of their limits.

#2

Their host claims that they have no limits. I'll ask the client to check their host's mail logs.

#3

OK - there seem to be errors with the PHP memory limit, and the last log, right after they tried sending a newsletter, contained this:

warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home2/[domain]/public_html/sites/all/modules/mimemail/mimemail.module on line 398.

#4

Any comment on the mimemail error? The host increased the php memory limit, so we'll see how the next one goes.

#5

I just ran into a similar issue today where simplenews or mimemail just suddenly stop being able to send html newsletters. Plaintext works fine, but html does not. When sending a test newsletter, it just says updated - doesn't say it send it out. If i set it up to send via chron, just get a bunch of errors about outgoing email failed. One new thing I added today was the signup module. I'm wondering if that happened to cause some sort of conflict?

#6

I'm going to try updating Mimemail and see if that helps. The last time a newsletter was tried, these are the repeated messages in the log:

This sounds like a SimpleNews message:

Type newsletter
Date Friday, April 3, 2009 - 01:10
User Anonymous
Location http://(xxx)
Referrer
Message Newsletter (xxx) could not be sent to (xxx).
Severity error
Hostname (xxx)

Will update Mimemail after seeing this again:

Type php
Date Friday, April 3, 2009 - 01:10
User Anonymous
Location http://(xxx)
Referrer
Message file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Filename cannot be empty in /home2/(xxx)/public_html/sites/all/modules/mimemail/mimemail.module on line 398.
Severity error
Hostname (xxx)

What does 'notice' mean? Certainly doesn't sound like it went through.

Type simplenews
Date Friday, April 3, 2009 - 01:10
User Anonymous
Location http://(xxx)
Referrer
Message Outgoing email via mimemail.
Subject: (xxx)
Recipient: (xxx)
Severity notice
Hostname (xxx)

#7

I'm getting a similar error when mimemail sends out a confirmation email from the Event Manager Module.
Thing is, the mail get sent just fine, but everyone has to see the ugly error message below on the registration confirmation page.

warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/whilewew/public_html/coach/sites/all/modules/mimemail/mimemail.module on line 398.

No code changes were done, and it started to happen suddenly.

Any ideas

#8

The client sent a test email to 5 recipients yesterday and that error showed up in the log 5 times. I have an issue open for Mimemail at: http://drupal.org/node/425436

#9

I've got the same message after sending a newsletter to 1500 recipients. Every time I run cron I get another stream of this kind's message in my log.

The day before yesterday I deleted about 200-300 fake users (spam). Maybe the system have not sincronized the list of deleted site's users with the list of newsletter's accounts. Is that possible (I've checked the correct checkbox in my newsletter general configuration...) ?

#10

In mime.module wrap line 398 with:

if ($style) {
$output .= file_get_contents($style);
}

so...

before:
$output .= file_get_contents($style);

after:
if ($style) {
$output .= file_get_contents($style);
}

AttachmentSizeStatusTest resultOperations
mimemail.module.patch127 bytesIgnored: Check issue status.NoneNone

#11

apg's patch from #10 fixed the issue I was having with the mimemail.module.

Thanks, agp.

#12

Status:active» fixed

@apg thanks for sharing this code, but in the current 5.x version of simplenews this problem is already fixed. The code is now:

  if (file_exists($style)) $output .= file_get_contents($style);

See also: #425436: Mimemail not sending with SimpleNews

#13

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here