emailjs
emailjs copied to clipboard
Can't send svg and canvas
I tried to send svg or canvas, but it didn't show in the email. here's my code:
const message = await client.sendAsync({
text: `Halo ${guest.name}`,
from: 'Gintano & Nesya',
to: `${guest.email}`,
subject: 'Wedding Invitation!',
attachment: [
{ data: '<html> <span>halo semuanya</span> <svg width="400" height="100"> <rect width="400" height="100" /></svg></html>', alternative: true }
]
});
does this library have a function to send svg or canvas element?
was looking this feature aswell, But still didn't find a way to do it.
i have a few questions:
- is any html data making it (such as your
<span>halo semuanya</span>)? - if not, does removing the
svgcode fix it? - is this behavior consistent across email hosting providers?
we shouldn't be modifying your data from our library, so my first assumption is that it's the email hosts stripping out the svg code. we can do an investigation after we've confirmed this isn't the case 😄
not enough information to reproduce