Modify Mail Template with PDF Attachment

  • shringtech
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

shringtech created the topic: Modify Mail Template with PDF Attachment

First and foremost, Thank You for Breezing Forms. It has turned out to our "goto" forms app. Huge fan!

I need some help with mail template and PDF attachment.

Step 1 - Built QuickForm with admin email submission. Shows 10 of 10 fields submitted.
Step 2 - Modified mailtpl & mailbacktpl files as needed and tested perfectly. Showing 2 of 10 submitted form fields as expected.
Step 3 - Change form to include PDF (with password protection) as an attachment. Now the email contains all of the data submitted as well as the attached pdf. Email contains 10 of 10 fields again.

My goal is to have the PDF attached contain all submitted data (password protected) but have the email contain on certain submitted form fields showing only 2 of the 10 fields.

I have reviewed both export_pdf.php and pdf_attachment.pdf but am not seeing email template type settings. Maybe I am missing it. Also found tpl files in ./administrator/components/com_breezingforms/mailtpl but modifying these makes no change.

Could you point me in the right direction or is this even possible?

Thanks again for such a great product.
#164993
  • shringtech
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

shringtech replied the topic: Modify Mail Template with PDF Attachment

Surprised to see no response. Anyone out there?
#165192
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Modify Mail Template with PDF Attachment

Hi,

first of all, sorry for the late answer. We have crazy days because of the BreezingCommerce release.

You should try to manipulate this file:
\media\breezingforms\pdftpl\pdf_attachment.php

- About the password protection of this generated pdf file, i never saw something like that. Please give me more time to investigate about it and do some tests.
- To implement a complex pdf, i send you a pretty complex pdf template that sure that it is very useful for you.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#165350
Attachments:
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Modify Mail Template with PDF Attachment

Ok, after some test i can create a static password for the PDF atachment. We use the tcpdf class to generate PDFs, so just implementing the following code line into the exppdf function placed into
joomla_root\components\com_breezingforms\facileforms.process.php
$pdf->SetProtection(array('print', 'copy'), 'MyPassword', null, 0, null);

the end of that function looks like this (code line around 5048)
$pdf->lastPage();
        $pdf->Output($pdfname, "F");
        return $pdfname;
    }

changing it to
$pdf->lastPage();
        $pdf->SetProtection(array('print', 'copy'), 'MyPassword', null, 0, null);
        $pdf->Output($pdfname, "F");
        return $pdfname;
    }

all your Admin Email PDF attachment will ask about a password, and in this case the password is MyPassword.

I hope this helps.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#165359
  • shringtech
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

shringtech replied the topic: Modify Mail Template with PDF Attachment

No worries. Was not aware of big release and certainly takes priority.

I will review the PDF_attachment again but I didnt see anything specific to email. It was my assumption that if i modified that file, it would also change the PDF and thats not what Im looking for. I want PDF to contain all data but the email to ONLY include 2 of the 10 fields in the form. Normall would just modify mailtpl but it seems this has no effect on emails with a pdf attached.

Am I correct to assume that mods to pdf_attachment.php affects BOTH the contents of the pdf AND the email contents?

Related to pwd protected pdf. I have this working perfectly. Each email attached pdf is pwd protected and works awesome. Actually found the solution on the Crosstec Forum HERE .

Kudos to yourself and #icedman21 ... Thank You.
#165415
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Modify Mail Template with PDF Attachment

shringtech wrote: Am I correct to assume that mods to pdf_attachment.php affects BOTH the contents of the pdf AND the email contents?


No. If you want to display just two elements into the Email, you can create fastly a custom email template as here described:

crosstec.org/en/support/online-documenta...68-admin-emails.html

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#165538
Moderators: ForumSupporttomeperica
Time to create page: 0.076 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here