laravel - Adding Email Attachments From Local Storage -


i using laravel/lumen. able save files using storage::disk("local")->put(); in storage directory. want attach few of files email , send, done job error

lumen.error: exception 'swift_ioexception' message 'unable open file reading

now read symbolic linking tried did not change result, still unable attach files n storage folder emails.

this directory structure:

/home/xxxxxx/:

-example.app

--storage

---app

----public

-public_html

--example.app

---storage

attaching file this:

foreach ($params["attachments"] $attachment) {     $mail->attach($attachment["file"], [         'as' => $attachment["name"],         'mime' => $attachment["mime"]     ]); } 

okay apparently swift mailer fails when pass full url instead of real path file. didn't know this, don't know if it's bug or done design.


Comments

Popular posts from this blog

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -