note 110606 deleted from function.mail by crell
| From: | crell@php.net | Date: | Tue, 12 Apr 2022 01:09:25 +0000 |
| Subject: | note 110606 deleted from function.mail by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218223@lists.php.net to get a copy of this message | ||
Note Submitter: shenyqwilliam
----
If you're sending a large attachment, you may encounter overflow problem.
AFAIK, two common limits could be responsible.
1. Postfix message size limit.
Edit /etc/postfix/main.cf . Change the value of "message_size_limit".
2. Apache memory size limit for scripts.
Edit /etc/php.ini . Change the value of "memory_limit".
//Then reload (or restart) Postfix and Apache.
//Empirically, sending 200MB attachment requires 500MB memory.
Be careful! Raising memory limits may cause unexpected consequences, and is hence deprecated.
Recommended alternatives include:
* Pack and split attachment into several emails.
* Only include a link to the file. The receiver can download it later.
* Use IMAP/POP3 server (e.g. Dovecot).