Link to home
Start Free TrialLog in
Avatar of aaron248
aaron248Flag for United States of America

asked on

PHPMailer-FE

Hello, I'm using PHPMailer-FE 4.0.6 to create a form where the user can upload multiple files. The form itself works and e-mails me successfully with proper error checking.

However, the user is able to upload files of any extension and they will attach and be sent with the e-mail. I tried setting the following line in form.config.php to no avail
:
$_POST['allowedFileTypes']        = 'pdf|jpg|jpeg|png|gif|zip';

Doing some searches on Google proved unsuccessful. Played around with the code in phpmailer-fe.php as well. Any ideas on what has to change in the default phpmailer-fe.php code to allow only certain file extensions to be attached/uploaded? Or am I missing something else.

Thanks in advance for any help!
Aaron248
ASKER CERTIFIED SOLUTION
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aaron248

ASKER

I didn't even think to look default.config.php. I had it already uncommented in form.config.php. Doing that and adding the exit() statement did the trick. Thanks guys for the help!

Aaron