Email the PDF,EXCECL and CSV through mydbr

(7 posts) (2 voices)

Tags:

No tags yet.

  1. vsivaprabu, Member

    Dear Team,

    I need to add the option "Email PDF, Email CSV and Eamil xls" under the export option. When I click the that option need to send the mail with attachment. Is it possible do to this? If it possible please give the example. I have premium version only.

    Also, I have added the follwing gmail smtp detils in environment setting. But email not triggered. Please advise this also

    Host : smtp.gmail.com
    Port : 465
    Encryption : ssl
    Username : ssss@gmail.com
    Password: -------

    I getting following issue

    SMTP Debug

    2015-07-02 09:26:44 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known (0)
    SMTP connect() failed.

    Thanks,
    Sivanesan.V

  2. myDBR Team, Key Master

    The export menu does export to local disk in format you chooose. If you want to mail the report, use dbr.mail command and add a mail-button to the report.

    As for the smtp.gmail.com not being recognized, increase the debugging level (use 2) and see that your server can connect to smtp.gmail.com.

    --
    myDBR Team

  3. vsivaprabu, Member

    Thanks for Quick reply. I have added the following line the report but I getting blank page result after the submit the report.

    select 'dbr.button', 'Email Report';

    Now smtp.gamil.com working

    Thanks,
    Sivanesan.V

  4. vsivaprabu, Member

    Hi,

    Now I have added the button in with following code.

    CREATE PROCEDURE sp_DBR_Model(vCompanyid int,StartDate date,EndDate date)
    Begin
    select 'dbr.report', 'sp_DBR_Model';
    select 'dbr.button', 'Email Report';
    select vCompanyid;
    select 'dbr.mail';
    select 'dbr.mail.debug', 1; select 'dbr.mail.attach', 'report.pdf', 'https://www.sss.com/mydbr/report.php?r=28&u1=1&u2=2015-06-01&u3=2015-07-01&h=45435435&export=pdf';
    select 'vvvv@gmail.com', 'Test', 'Notification',
    concat('Here is the latest report siteontime', char(10),
    '-- ', char(10),
    'Mary'); SELECT * FROM users WHERE company_id=vCompanyid and created_at between StartDate and EndDate; END

    I don't how to proceed this. Please advice. I need to send email with attachment to admin user.

    I have added the mail code separate procedure its working fine.

    Please help for this.

    Thanks,
    Sivanesan

  5. myDBR Team, Key Master

    You put the mailing code to separate report and call the report from the otiginal one i.e, put the dbr.button + dbr.report with the mailing report into the original. When user clicks the button, the mailing report is run and the mail sent.

    --
    myDBR Team

  6. vsivaprabu, Member

    Thanks For reply your I have done this.

    Is there any possible to include the page number in PDF export page?

    Thanks,
    Siva

  7. myDBR Team, Key Master

    PDF export (when you have wkhtmltopdf installed) will show the page number in the header. If your PDF export does not show the header, make sure you have the latest version of the user/export_header_pdf.php-file. You can download the myDBR version and get the version from there. myDBR updater will not update this file as it is in user-directory.

    --
    myDBR Team


Reply

You must log in to post.