How to use mail queue for send an email with pdf attachment?

Published 1 month ago by dreamxyz

I tried

Mail::queue(...)

but it just like

Mail::send(...)

It takes very long time to send the email out to user, can i use queue to prevent this issue?Or is there any method i can used to prevent execution time exceeded when sending mail with pdf attachment? Thanks.

lancecoder

@dreamxyz do you follow this documentation? https://laravel.com/docs/5.5/queues

christianyeah

they are different things. not sure about your laravel version. check the doc below. https://laravel.com/docs/5.5/mail#attachments. what you need to do is attach pdf in the mail, its irrelevant with queue

dreamxyz

@christianyeah When i convert a view into pdf it takes about 360 seconds of loading, which is not good.

dreamxyz

@lancecoder Yes, i tried but seem like not working for me. If got sample then is good, not sure whether i am doing it in wrong way or what.

Please sign in or create an account to participate in this conversation.