title: Mail method attachData not work with file
body: <p>I have csv file:</p>
  <pre><code>$fileContent = $tempLocalDriver-&gt;get($file-&gt;getFilename()); // UTF-8
  </code></pre>
  <p>next, this file movie to job:</p>
  <pre><code>$fileInfo = [
      'file' =&gt; base64_encode($fileContent),
      'name' =&gt; sprintf('attachment.%s', $file-&gt;getClientOriginalExtension()),
      'mime' =&gt; $file-&gt;getClientMimeType()
      ];
  
  ProductImportNotificationJob::dispatch($user, $fileInfo);
  </code></pre>
  <p>In job instance mail-object and run this code:</p>
  <pre><code>$mailObject = new ProductImportNotificationEmail();
          $mailObject
              -&gt;attachData(
                  base64_decode($fileInfo['file']),
                  $fileInfo['name'],
                  ['mime' =&gt; $fileInfo['mime']]
              );
  </code></pre>
  <p>scrip crashed with error &quot;Unable to JSON encode payload. Error code: 5&quot;
  How to fix it?</p>