Search code examples
phpcsvphpmailer

Sending email attachement using PHPMailer


I'm trying to send an email with an .csv attachment size is 7.5mb only and the email recipients send and receive limit is 10mb but it seems that the email was not sent but changing recipients email capacity to 20mb solves the issue.

Can someone help me with this. Thanks


Solution

  • When you add an attachment, it gets base64-encoded, which adds considerable overhead to the message size, in your case enough to take it over the size threshold. A better approach would be to make the item available via download link and send them that instead.