emailjs icon indicating copy to clipboard operation
emailjs copied to clipboard

Can't send svg and canvas

Open GifinoThoriq opened this issue 3 years ago • 2 comments

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?

GifinoThoriq avatar Mar 18 '22 13:03 GifinoThoriq

was looking this feature aswell, But still didn't find a way to do it.

Wavesolid avatar Mar 18 '22 13:03 Wavesolid

i have a few questions:

  • is any html data making it (such as your <span>halo semuanya</span>)?
  • if not, does removing the svg code 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 😄

zackschuster avatar Apr 04 '22 16:04 zackschuster

not enough information to reproduce

eleith avatar May 12 '23 22:05 eleith