I have problems sending emails through queues and would like help with the behavior or handling of queues to send PDF files uploaded from a form and / or PDF created with DOMPDF.
Well sending an email requires a file stored on a server. So whenever you upload or generate a PDF you store it somewhere on your server. Than you put the email on the queue in a job for example. The job should then fetch the pdf and send it along with the email. This way the stuff on your queue is small and fast and you can send the email using a queue.
Next time, probably easier to help if you post the error and/or exact issue you're having. Laravel makes it really easy if you use the helpers to send emails with any data and attachments.
FYI every email service uses Queues to send emails, even MS Exchange Server. So it a normal thing.
So the problem here is that you don't save the file first. You currently send the posted data (UploadedFile) to the job, but that is not possible. You first need to save the file to your filesystem. Then you can queue a job that sends the email. The email itself should get the file from the filesystem and attach it to the email.