user1022422
user1022422

Reputation: 61

php mail() won't send attachment over 10MB

I have set these variables in php.ini but mail will not send an attachment over 10MB:

max_execution_time = 8000 ; Maximum execution time of each script, in seconds
max_input_time = 8000     ; Maximum amount of time each script may spend parsing request data
memory_limit = 800M       ; Maximum amount of memory a script may consume (8MB)
post_max_size = 50M
upload_max_filesize = 50M

Solved:

The problem was solved by editing /etc/postfix/main.cf and making message_size_limit larger. Also, for those having problems with mail(), try "tail /var/log/mail.log" to see errors.

Upvotes: 2

Views: 595

Answers (1)

cbroughton
cbroughton

Reputation: 1856

Please see some examples / tutorial at this link.

This person makes a good point here that the mail server can set a limit on the attachment file size as well.

Please read a very good point here about email not being a file transfer software!

Upvotes: 1

Related Questions