Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDFReports: Broken Email Attachment in 1.4 #2456

Closed
anonymous-matomo-user opened this issue May 27, 2011 · 15 comments
Closed

PDFReports: Broken Email Attachment in 1.4 #2456

anonymous-matomo-user opened this issue May 27, 2011 · 15 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

Since the upgrade to 1.4 the email report seems to send empty mails. Thunderbird 3.1.10 shows an attachment, but there is non visible content, when the mail is open. The source code of the email reveals however, that the mail content is present:

Received: (qmail 14324 invoked by uid 10456); 27 May 2011 02:48:49 +0200
Message-ID: <20110527004848.14312.qmail@my_server.info>
To: foo@bar.xy
Subject: Report Foobar - Thursday 26 May 2011
From: Piwik Reports <noreply@my_server.info>
Date: Fri, 27 May 2011 00:48:47 +0000
Content-Type: multipart/mixed;
 boundary="=_cb2a5a278aefc665fc0cbb2dc043119c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
MIME-Version: 1.0

This is a message in Mime Format.  If you see this, your mail reader does not support this format.

--=3D_cb2a5a278aefc665fc0cbb2dc043119c=0A=
Content-Type: text/plain; charset=3Dutf-8=0AContent-Transfer-Encoding: quot=
ed-printable=0AContent-Disposition: inline=0A=0A=
Hello,
Please find in attached file your Daily report for Foobar.
--=3D_cb2a5a278aefc665fc0cbb2dc043119c=0A=
Content-Type: application/pdf=0AContent-Transfer-Encoding: base64=0AContent=
-Disposition: inline; filename=3D"Report Foobar - Thursday 26 Ma=
y 2011.pdf"=0A=0A=
JVBERi0xLjcKMzkgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAxIDAgUiAvTGFzdE1v=0A=

...

Tested with Thunderbird 3.x on different computers.
I can download the pdf just fine via the backend.

@julienmoumne
Copy link
Member

With thunderbird 3.1.10 I see the message

Hello,
Please find in attached file your Weekly report for xx

and can download the pdf file from the mail and open it.

Have you checked with a webmail or a different mail client ?

Have you tried sending it in HTML ?

If your report doesn't contain sensitive data you could forward it to piwik-hackers@piwik.org. (the best would be to temporarily add piwik-hackers@piwik.org to the list of destination email adresses and manually send it because forwarding can temper the mail).

@anonymous-matomo-user
Copy link
Author

I had piwik send a report to piwik-hackers@ containing some "uncritical" statistics.

I'v checked the report mail via horde webmail. Horde tells me, the attachment is 0kb - which is not true, as it has several kb of data in the mime attachment part of the mail, which I can see using an editor. My 1st guess: someting wrong with the MIME headers?

Let me know if I can do some furter tests.

@anonymous-matomo-user
Copy link
Author

For the record: the HTML version works just fine. PDF generation is not an issue as I can download the PDF in der piwik backend.

@julienmoumne
Copy link
Member

Unfortunately I did not receive the mail, how about the other developers ?

@anonymous-matomo-user
Copy link
Author

Maybe the sender address has to be registert to the piwik developer list? I'll be happy to send the report to a different address, if needed.

@robocoder
Copy link
Contributor

I didn't get it either. Not sure if piwik-hackers @ piwik.org is even a valid alias. Try hello @ piwik.org instead.

@anonymous-matomo-user
Copy link
Author

Report send to hello@...

@julienmoumne
Copy link
Member

Mail received. Is it possible for you to try another SMTP server (from a different provider) to see if it is tempering the mail ?

@anonymous-matomo-user
Copy link
Author

It's my own server running a plain vanilla qmail. I don't have a different mailserver at hand at the moment. I'll set up an other one if needed but I don't think the mailserver is the problem. Befor the upgrade from 1.3 to 1.4 the server delivered the pdf reports just fine.

@robocoder
Copy link
Contributor

If you're not using the SMTP settings, (in your case) php will use the sendmail wrapper for qmail. Since qmail strictly expects CRLF and we're seeing =0A in the message body, this could explain the malformed attachments.

That said, Piwik uses Zend_Mail, and this should be working per ZF-1944.

See http://www.dt.e-technik.uni-dortmund.de/~ma/qmail-bugs 6.2 for a qmail workaround and fix.

@anonymous-matomo-user
Copy link
Author

Thanx for pointing out the qmail issue.

I activated teh SMTP settings as stated in
http://piwik.org/faq/how-to/#faq_93
I used localhost as server, provided the necessary settings (username, password, ssl) but still: I get the =0A= et the end of each line. Am I missing something?

I wanted to try an external mail server (running exim) and stumbled across an other issue: the piwik SMTP dialog does not accept certain charakters like "#" or "+" in the user name. Aufter saving they are replaced by white space. Unfortunately my user contains an "+", so I could not test yet. Should I open an other Bug for this?

@anonymous-matomo-user
Copy link
Author

I just created a gmail account and used Goolges SMTP to send the report. I included hello@ ... to the list fyi. As it seems, the issue still remains :-(

@julienmoumne
Copy link
Member

Just received it (Mon, 30 May 2011 20:20:02 +0200) and the pdf file is readable.

@anonymous-matomo-user
Copy link
Author

Interesting ... qmail messes up the attachment receiving (!) the report mail as well.
Sending via qmail & receiving via qmail -> broken
Sending via qmail & receiving via gmail -> broken
Sending via gmail & receiving via gmail -> works

So I will look into qmail. But IMHO this still remains an issue as I wont't be able to tell others "use a different MTA if you want a report" ;-)

@mattab
Copy link
Member

mattab commented Jun 1, 2011

Is this really an issue? it works for nearly everybody so I tend to think it's a software vendor issue, but please feel free to comment (or better, submit a patch ;) and we will reopen

@anonymous-matomo-user anonymous-matomo-user added this to the 1.x - Piwik 1.x milestone Jul 8, 2014
@mattab mattab added the wontfix label Aug 3, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

4 participants