"Send HTML mail" is sending allways attachment.dat empty file (even when no attachment is provided in the form).

This is usecase:
- mailsystem 7.x-2.34 and mimemail 7.x-1.0-beta4+2-dev
- An entityform with a file field
- A custom entity submition rule with "send html mail" action
- The attachment is passed to the rule as parammeter in the following format: sites/default/files/form-attachments/[entity:field-form-attachment:file:name]

When the form is submitted, the attachment is sent with the mail, but in addition, there is an empty file called "attachment.dat". This file is allways sent. Does'nt matter if the user has selected an attachment or not.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

akalam created an issue. See original summary.

akalam’s picture

akalam’s picture

Status: Active » Needs review
Dimetry’s picture

I have two very similar sites.
One site has the problem but another site is fine.
Can't understand the problem yet.

Patch works for me. Thanks.

GiorgosK’s picture

Status: Needs review » Reviewed & tested by the community

This works as expected
3rd report that patch works (together with akalam)
should be committed

sgabe’s picture

ndf’s picture

Status: Reviewed & tested by the community » Needs review
Related issues: +#2553815: mail.css imported font generates empty attachment

The related issue solves this in a different way (mail.css imported font generates empty attachment).
The fix in the related issue is committed on 7.x-1.x branch (develop).

Moved the status of this issue back to "Needs Review".

Now this should be tested again:
- Is the issue fixed when switching to 7.x-1.x -> if that's the case, this issue should go to "Closed (duplicate)" or "Closed (outdated)".
- If the issue is only fixed with the patch in this issue, then we should move it back to RTBC.

sjsam’s picture

This patch fixed the issue for me in '7.x-1.0-beta4'.
Below is my use case.
- I have a simplenews node to which more than one view is attached as eva
- Use mail-system -- mimemail to send the above node as an email to subscribers
- Use a simplenews scheduler to make revisions of the above node and carry on sending emails
at regular (preset) intervals.

Buvaneshwari.V’s picture

I too faced the same issue, but by creating mail.css file in theme folder resolved my issue.

Buvaneshwari.V’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

akalam’s picture

I see the patch is not commited. Sould not be?
I think the mail.css is a diferent issue. I am wrong?

dzepol’s picture

This is not related to the mail.css issue. Can confirm that this patched fixed the problem for me with the latest version.

For me, Webform + Mimemail (with or without image/attachments) always sends a empty .dat file.

I attempted the mail.css fix, changing settings within webform/mimemail/mailsystem to match other resolved issues and it didn't work. Finally came back around to trying this patch (last ditch effort) and it worked. No errors other problems have come up.

I think the issue should be reopened and patch applied.

truls1502’s picture

Can someone maintainer reopen the issue and push the commit?

prabha.venkatesan’s picture

The #2 patch given by akalam works like a charm. It would be great if it is committed to the mimemail module.

jerdavis’s picture

Status: Closed (fixed) » Needs review

Re-opening for discussion. If this is to be committed we'd also need a test written.

jerdavis’s picture

Status: Needs review » Needs work

Setting to "Needs work" as a test needs to be provided.

TR’s picture

Issue tags: +Needs tests
TR’s picture

Marked #3021000: Import font generates attachment when url starts with // as a duplicate.

We need a re-roll of the patch to apply to current HEAD and to fix the coding standards violations, and we really do need a test to both demonstrate the problem and prove the solution.

edward.peters’s picture

I have tried the patch but it did not solve this issue which I am also having. I wonder whether anyone has any more advice on a way forward?