forward print view with email

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
patsd102
Veteran Member
Posts: 142
Joined: 2013-01-15 19:59

forward print view with email

Post by patsd102 » 2016-05-21 18:53

Can I ask, has anyone ever emailed the contents of the print page.
I would like to forward the information on it via an email,

Thanks
23.17

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: forward print view with email

Post by AhmedBR » 2016-05-21 20:47

Go to the example at this link:
The following example sends a notification email to an employee when a user submits a new record. The email contains the record data.
https://bigprof.com/appgini/help/advanc ... ific-hooks

Use the same code at the footer or header HOOK of the table you want in case 'print-detailview'
I believe this should do it.

have a nice day
Ahmed
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

patsd102
Veteran Member
Posts: 142
Joined: 2013-01-15 19:59

Re: forward print view with email

Post by patsd102 » 2016-05-22 09:01

Thanks for the reply.
Its not what I want,

I want a box where I can insert an email address to send to.
23.17

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: forward print view with email

Post by AhmedBR » 2016-05-22 15:36

Add a field in the detail view and insert the email you want, make it as a variable to pass to the hook function.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: forward print view with email

Post by grimblefritz » 2016-05-23 03:52

There are a number of browser extensions that will do this. I use one for Chrome called Explain & Send Screenshots. Awesome Screenshot also works well.

There's also a print driver (for Windows) called Print2Email. Not free, but there's a trial version. And there's probably more than just this one.

patsd102
Veteran Member
Posts: 142
Joined: 2013-01-15 19:59

Re: forward print view with email

Post by patsd102 » 2016-05-24 17:33

HI AhmedBR

Could you give me an example of the variable, and where to place it,

Thank you

Pat
23.17

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: forward print view with email

Post by AhmedBR » 2016-05-26 12:37

You can do something like this:
Let`s say the field name you create is eMail

Change the code from this:

Code: Select all

// mail recipient
"[email protected]"
To This:

Code: Select all

// mail recipient
"{$data['eMail']}"
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

Post Reply