QR code generator for email using reactjs

379 Views Asked by At

So I am trying to generate QR code using react-qr-code module in the value field I gave mailto:${email}?subject=${subject}&body=${body} format but when I scan using google lens it's getting converted to https://mailto:_______ which will not work how to resolve this issue?

1

There are 1 best solutions below

0
On BEST ANSWER

mailto:${encodeURIComponent(email)}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}

will work