Using latest dev version of simplenews and mimemail, the subject is blank in emails sent.

When I turn on log, watchdog seems to show that the subject is passed as "message type" and not as subject. Look :

Outgoing email. Message type: test
Subject:
Recipient: philippe.jadin@**** Sent via Mime Mail

Investigating

Comments

simon georges’s picture

Mimemail support in D7 is pretty much broken for now (see #1090016: Newsletter sent when Mail system set to Standard / not when set to Mime mail, #1048254: Support Mime Mail on Drupal 7, #1106730: Several Notices, Malformed Emails). Don't hesitate to provide some debug, I'll work on that next week.

philippejadin’s picture

Same problem without mimemail (well mimemail installed, but mail sent as plain text). I cannot explain more. It seems the subject is not passed to drupal_mail, is it possible?

How can I debug this ?

philippejadin’s picture

Ok, after some more testings :

First time a node is saved than sent using the test feature, the mail has a subject. If I edit the node and save it back, the mail won't have a subject anymore.

It seems the whole array is not right, it is shifted one element.

Sorry, I'm not a "real" developer :-)

simon georges’s picture

The subject comes from the Newsletter defintion (when you edit the newsletter category, you can choose the title (using tokens)). What do you have in this field ?

philippejadin’s picture

I tried to remove the first part, so the token is not enclosed in two [[ ]], also tried to put a fixed string like "test", but it still doesn't work.

I suspect an array containing all the email headers and fields is shifted somewhere.

simon georges’s picture

It's strange, I never had that bug.
Could you eventually disable mimemail, to see if there is a conflict in the current version ?

simon georges’s picture

Status: Active » Postponed (maintainer needs more info)
facine’s picture

This happens if the subject field contains for example: ". ", "¿", etc ...

simon georges’s picture

Status: Postponed (maintainer needs more info) » Active

Is it the same with Drupal standard mails ? For example if you add such characters in "New password" e-mail subject ?

facine’s picture

New password subject works fine

simon georges’s picture

Ok, thanks for your help in debugging, I will check that !

miro_dietiker’s picture

Status: Active » Needs work

Smells like a mimemail issue to me... Mimemail needs some love to improve all encoding (probably decoding) cases.
Sounds like the coding somehow failed...

Someone please add debug statements in code (devel, dpm, ...) and provide feedback. We might even move this issue over to Mimemail then.

philippejadin’s picture

I can confirm that html sending works (at least when sending test email) with latest simplenews and mimemail dev and drupal 7.2.

However, the subject of the email disappears in this situation :

- create a simplenews node with title "test"
- send a test email
-> email received with the correct title
- edit again the node, save it
- send a test email
-> email subject is blank.

This bug appears with and without token in the configured newsletter title.

gratefulsk’s picture

I don't believe this is a MIME MAIL issue. I am using HTML Mail and I am receiving the exact same problem.

  1. I create a newsletter.
  2. Send test email. Email is fine and includes the subject.
  3. Then if I edit the newsletter and save it, I get no subject on the next test email.

It would be great if this bug got resolved.

gratefulsk’s picture

Found a workaround!

OK, so after days of testing every possibility imagined, I believe revisions is a culprit for causing this issue. I decided to edit the newsletter content type setting to not create a new revision. I then created my newsletter and edited it over 5 times with the subject successfully being sent on the test emails as well as the final send.

So, I am not sure why not creating a revision bypasses this issue, but I am just glad that my client can now edit his newsletters with no problems with the subject.

I am using:
Simplenews 7.x-1.x-dev
HTML Mail 7.x-2.60

simon georges’s picture

Revisions are not supported at all (see #1114090: Remove broken revision handling).
Anyway, thanks for your feedback, maybe we could find a way to at least have the title working.

philippejadin’s picture

I can confirm that the title is kept if revision are disabled / not used for the simplenews content type.

In Structure -> Content Type -> Simplenews -> Edit

You have to uncheck "Create a new revision"

And I guess you cannot create a new revision when saving the simplenews node you are working on.

(Simplenews Drupal 7 seems to be usable now, I will report on a 10.000+ subscribers mailing soon)

berdir’s picture

Status: Needs work » Closed (duplicate)

Closing this issue as a duplicate of #1114090: Remove broken revision handling then as multiple reports have shown that this issue is because of broken revision handling.

ryank76’s picture

Status: Closed (duplicate) » Active

I have revisions unchecked for both content types that I am using as a newsletter (Simplenews newsletter and Article) and am still experiencing the issue. So I don't believe it's a duplicate of that issue and I am unable to find a cause or workaround.

EDIT: I switched from 7.x-1.0-alpha1 to 7.x-1.x-dev and that has fixed the issue.

simon georges’s picture

Status: Active » Closed (duplicate)

Let's let it closed if it's fixed in -dev ;-)