Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

isaac23's avatar

How to send mail With PDF or Image attachment from URL link

$data = array( 'name_first' => $this->application['firstName'] , 'pathfile' => $this->application['path'], ); return $this->markdown('emails.jobapplication') ->with([ 'name' => $data['name_first'], ]) ->attach($data['pathfile']);

images ore working perfectly but pdf url not working here is the url http://res.cloudinary.com/ivhfizons/image/upload/v1646916307/uploads/x0vfmvgetnytnl7bccni.pdf

need help anyone thanks

0 likes
2 replies
okusax's avatar

hi @isaac23 why you need to send the pdf as an attachment and not just send the link to download it?

I think you can download the PDF to your local and attach it but it could be a really inefficient way to work with.

There is an old question here but with s3 and the conclusion was download it locally and attach it or just send the link.

Take a look at: https://laracasts.com/discuss/channels/laravel/attaching-remote-files-which-are-stored-in-aws-s3-bucket-while-sending-an-email-in-laravel?page=1

isaac23's avatar

@okusax Hello thanks for your reply.. i wanted to use laravel to upload my file to an external service. so wanted the file to be uploaded via laravel as the backend

Please or to participate in this conversation.