I have a long form, should be possible to upload 5 files of 5Mb each one; when I upload more than 3 files (> 15mb) I get the 500 error, I can see all the files are uploaded, but are not sent in the email as attached, not even an email message is being sent, contrary if I upload mutliple files with less of equal of 15Mb in total.
The SMTP is configured to send 30 Mb, so that shouldn’t be the problem.
When I remove AjaxUploadAttachments hook from the form it, of course I don’t see the error, and I don’t have the email message in my inbox.
It can be a timeout of PHP with the large size of the attachments. They have to be encoded for the mail and sending them consumes also time. Do smaller files work?
If yes, you could try to increase the timeout.
You should also check the PHP error log for a different cause of the error. Timeouts are normally not logged if I remember right.
There is a debug setting in phpMailer. You can add that in the code of the email hook. This could help to understand what is going wrong during preparing and sending the mail.
If you can’t change the timeout: I have built a mailqueue implementation for one of my commercial extras which can go into a different extra.
Or you can save the files on the server and just send links to the files.
Finally, the client agreed to have the files as links in the email message.
Here is the snippet that is called from the email template, if it could be useful to someone.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.