Hi,
i am playing around with sending out emails through mydbr. That works so far. Now instead of having the results directly in the email from a report, I wanted to attach a file directly from a report. I found the example for that in the documentation. So I created the example, but when I run it, the attached file is just empty with 0 bytes file size. Here is the code:
DROP PROCEDURE IF EXISTS sp_DBR_MailReport
$$
CREATE PROCEDURE
sp_DBR_MailReport
()
BEGIN
select 'dbr.mail'; select 'dbr.mail.sender', 'address@gmail.com', 'Ben'; select 'dbr.mail.attach', 'report.csv', 'https://myDomain/mydbr/report.php?r=17&m=1&h=bc98e7d3cc276ec344deb9af5ac3155069d22b12&i=1&export=csv';
select 'address@gmail.com', 'Ben', 'Notification', 'Attached Report';
END $$
If I run the included report URL directly it creates the file and I can download it, including the correct content. I first tried it with PDF, that also resulted in an empty file. Because I dont have the wkhtmltopdf extension installed, I thought it could be because of that, thats why I changed it to csv, but that also results into an empty file.
It would be great if you could help me figuring out why these attached files are empty.
Thanks,
benni