I am using EE 5.3.2 and have set up Mailgun SMTP in the settings. When I send an email through the Communicate utility, the email sends just fine, but if I try to add an attachment to the email, the attachment fails to send. I have tested using SMTP, sendmail, and PHP Mail in the Outgoing email settings, and in all cases, the email will send but the attachment does not get attached. I want to be able to send an email with attachment to email addresses or user groups, which the communicate page seems like it should work for, except the attachment issue. Has anyone run into this/solved it?


1 Answer 1


This issue is caused by the HTML form which is displayed not having enctype="multipart/form-data" set in the <form> tag. This causes $_FILES to be NULL.

I have edited lines 40 and 90 within ee/legacy/helpers/form_helper.php:

$form = '<form enctype="multipart/form-data" action="'.$action.'"';

Which seems to have resolved my issue for now. I believe my change will be lost when updating ee? Please recommend a better solution.

Thank you


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.