1
I get a string through a API
external, which comes directly from the client (I only take care of the website, making it impossible to change the type of information I receive). This string is a .pdf
which was encrypted in base64
and I need to send it in email to the customer, when he requests, and should be sent the link .pdf
, and not the attached file.
For the record, I work with PHP
, using Laravel
.
If I try to give Decode in this string, it generates a giant stream, but how would I generate the link with that stream?
If I use the command
window.open("data:application/pdf," + codigo_base64);
in theJavascript
, I can open the.pdf
perfectly in another browser tab, but, as I said, I need to send the same by email, thus losing any functionality to useJavascript
. Or am I wrong?If I try to use
<a href='data:application/pdf," + codigo_base64)'>
, the email client simply ignores the existence of the link, some client even display the link. (and to tell the truth, I don’t even know if such a command is possible)
Is there any way to send that .pdf
by e-mail?
Editing: Unfortunately, the client wants the download link sent, not the attached file.
If you turn again into
pdf
file stores in a temporary folder, makes an email attaches that item and send then erases the time? how about ?– novic
What is the version of your Laravel?
– novic
The problem is that my client wants the download link sent, not the attached file (I forgot to mention this). I am currently using version 5.2.
– lmartim