Why is the base64 string for attachments in PHP emails single line, while in other email clients it is multi-line?
The base64 string for attachments in PHP emails is single line because it is encoded using the `base64_encode()` function which does not add line breaks automatically. To make the base64 string multi-line like in other email clients, you can manually insert line breaks every 76 characters.
// Encode attachment file to base64
$attachment_data = file_get_contents('path/to/attachment.pdf');
$base64_attachment = chunk_split(base64_encode($attachment_data), 76, "\r\n");