send a file by email

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
magicalmutation
Posts: 11
Joined: 2013-08-07 17:15

send a file by email

Post by magicalmutation » 2014-04-10 12:46

would love a button to send a file to email from say an email field..

so for instance, you could attach a file such as a brochure and then email to the relevant or selected email address in same or child record.

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: send a file by email

Post by toconnell » 2014-04-11 18:19

you can send a link... to a record with a button.. like this..
Just put this code below in the hook file (see this link for how: http://www.bigprof.com/appgini/help/adv ... ore_insert)
for the table name under this line..

function YOUR TABLE NAME HERE_before_insert(&$data, $memberInfo, &$args){

Code: Select all

<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html xmlns="http://www.w3.org/1999/xhtml" />
<head></head>
<body>
<a href="http://YOUR DOMAIN NAME HERE.com/YOUR APPGINI FOLDER NAME HERE/TABLE NAME HERE_view.php?SelectedID=".$data['selectedID']."><button type="button">Click to email this record</button></a>
</body>
</html>
?>
 
Tina O'Connell
Web Dev & Appgini FAN

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: send a file by email

Post by toconnell » 2014-04-11 18:25

Woops.. forgot the email part.

here...

<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<script language="javascript">
function emailCurrentPage(){
window.location.href="mailto:?subject="+document.title+"&body="http://YOUR DOMAIN NAME HERE.com/YOUR APPGINI FOLDER NAME HERE/TABLE NAME HERE_view.php?SelectedID=".$data['selectedID']."+escape(window.location.href);
}
</script>
</head>
<body>
<button><a href="javascript:emailCurrentPage()">Click to email this page and link to this record</a></button>
</body>
</html>
?>
Tina O'Connell
Web Dev & Appgini FAN

Post Reply