Forum
Perch Forms Email (attachments)
Hey guys,
I've come across the same as Angie posted here: https://forum.grabaperch.com/forum/08-31-2017-perch-forms-emails-attachments The attachments are being sent with the email response which I need to remove. My email template:
<html>
<head>
<title>Referral Form Submission</title>
</head>
<body>
<p>A new submission has been sent</p>
</body>
</html>
My diagnostic report:
Perch: 3.0.9, PHP: 5.6.23, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.9), assets (3.0.9), categories (3.0.9), perch_forms (1.9.1), perch_gallery (2.8.9)
App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_gallery', ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/domain.co.nz/httpdocs/perch
PERCH_CORE: /var/www/vhosts/domain.co.nz/httpdocs/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/domain.co.nz/httpdocs/perch/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /var/www/vhosts/domain.co.nz/httpdocs
HTTP_HOST: go-able.xeno.co.nz
Thanks for your help. Steve
That's something we need to look into.
Thanks Drew.
Would there any chance of a hot fix? The client uses the forms to send medical documents to the server and doesn't want them attached to the submission alert email that comes through to them. They would like to get this site live this week if possible.
Cheers
Steve, I may have a solution for short term “ hot fix” that I will try in the next couple hours and then post this solution. I’m not in the office few a few more hours today.
R. K
There's no quick fix - you're going to need a new version of Perch to address it properly.
The workaround to go live would be to not send an auto response with Forms, but configure it on your mail server instead.
Steve, I was not able to come up with a working solution that was simple. Sorry
Drew, when you say a new version of perch, is this because it’s how Perch is handeling the auto response.. it’s not an issue within the forms app?
Just a curious question. Thanks.
Thanks to you both! I'll have a look at sending an auto response via the mail server.
Robert, it's because the Forms app reuses the same Email object to save memory, but there is (was) no way to clear that object of attachments. So to fix the problem in the app alone, the method would need rewriting to use two Email objects, which is fiddly and a lot more prone to error than actually fixing the problem.
I've fixed it for the next release when I'm back in the UK.
Thanks, that makes great sense. Happy travels.