What is the common issue faced when trying to send large MP3 files via email in PHP?

When trying to send large MP3 files via email in PHP, one common issue is that the file size may exceed the maximum upload size allowed by the server or email provider. To solve this issue, you can use PHP's `chunk_split()` function to split the file into smaller chunks before sending it via email.

// Set the maximum file size limit
$maxFileSize = 10 * 1024 * 1024; // 10 MB

// Check if the file size exceeds the limit
if ($_FILES['mp3_file']['size'] > $maxFileSize) {
    // Split the file into smaller chunks
    $mp3Data = file_get_contents($_FILES['mp3_file']['tmp_name']);
    $mp3DataChunks = chunk_split(base64_encode($mp3Data));

    // Send the file via email
    $to = 'recipient@example.com';
    $subject = 'Large MP3 File';
    $message = 'Please find the attached MP3 file.';
    $headers = 'From: sender@example.com' . "\r\n" .
               'MIME-Version: 1.0' . "\r\n" .
               'Content-Type: multipart/mixed; boundary="boundary"';
    $attachment = "--boundary\r\n" .
                  "Content-Type: audio/mpeg\r\n" .
                  "Content-Transfer-Encoding: base64\r\n" .
                  "Content-Disposition: attachment; filename=\"file.mp3\"\r\n" .
                  "\r\n" .
                  $mp3DataChunks . "\r\n" .
                  "--boundary--";

    mail($to, $subject, $message, $headers, $attachment);
}