I have a problem with my PHPMailer class.
There is a form with file upload functionality. The file uploads fine with no errors.
But I get the following output from the script:
Could not instantiate mail function. Unable to send message to * @ *.com
This happens only with the attachments of more than several megabytes. My php.ini configuration is fine:
post_max_size = 50M
upload_max_filesize = 50M
When I get this value below the actual upload size, then the page just refreshes and nothing happens. With the following values the file is uploaded and stored in the temporary folder but cannot be sent as attachment.
Any help will be appreciated
PS I can send emails with attachments of 1 MB with no problems
Okay, answering my own question. Sorry for wasting anyones time.
First of all, a look on /var/log/mail.log revealed this line
That made more sense now.
We go to /etc/postfix/main.cf and add the following line to the end of the file
And we have 20MB limit for file attachments, hooray 🙂