Hello,
I have a form that has a file upload field which uploads to the server, then the form submits to an email address.
I realise I can't add the file as an attachment, but I'd like to provide a direct link to the attachment as part of the email confirmation.
I've experimented with the show_securefile tags and also found a secret function used in the admin when showing the file name, but I can't get it to work. Any ideas?
I have a form that has a file upload field which uploads to the server, then the form submits to an email address.
I realise I can't add the file as an attachment, but I'd like to provide a direct link to the attachment as part of the email confirmation.
I've experimented with the show_securefile tags and also found a secret function used in the admin when showing the file name, but I can't get it to work. Any ideas?
- Code: Select all
<cms:send_mail from='******' to="*******" html='1' subject='Job Application Form Filled Out'>
<p><strong>Name:</strong> <cms:show frm_name /></p>
<p><strong>Telephone:</strong> <cms:show frm_tel /></p>
<p><strong>Email Address:</strong> <cms:show frm_email /></p>
<p><strong>Address:</strong> <cms:nl2br><cms:show frm_address /></cms:nl2br></p>
<p><strong>Position:</strong> <cms:show frm_position /></p>
<cms:show_securefile 'frm_ulfile' >
<cms:dump/>
<cms:php>
$data = "<cms:show file_id />" . '|0|0|0|0|2|0|0';
$link = K_ADMIN_URL . 'download.php?auth=' . urlencode( $data . '|' . $FUNCS->hash_hmac($data, $FUNCS->hash_hmac($data, $FUNCS->get_secret_key())) );
echo '<p><strong><a href="' . $link . '">Download CV</a></strong></p>';
</cms:php>
</cms:show_securefile>
</cms:send_mail>