sendmailemail-forwarding

PHP mail() with large attachment not sent


I'm implementing an email forwarder PHP program. Here is my requirement:

I almost succeed. Mails with small file attachments were forwarded to the destination, but the problem is with the large file attachments (zip file about 23MB I tried).
It seems to me mail sending was successful because I did not see any error generated from the mail() function, but I did not receive it in my destination.

What's wrong with the mail() function ? Or should I use imap_mail() in place?


Solution

  • As you are using php on commandline, I suppose, the only php limit I can thin of, is the memory-limit. But most likely this is not a php problem, but you run into the limits of your MTA. Squirrelmail has some information about MTA limits (section "Sending the mail with the attachment").