I add the map I developed with leaflet js to the body of the mail.
The body content of the mail is as follows;
<html lang='TR'><head><meta charset='utf-8'><link rel='stylesheet' href='https://unpkg.com/leaflet@1.7.1/dist/leaflet.css'><script src='https://unpkg.com/leaflet@1.7.1/dist/leaflet.js'></script><style>#map { width:100%;height:326px } body { margin:0;background:#fff!important } </style></head><body><div id='map'> </div> </body></html><script> var mymap = L.map('map').setView([41.03769103280778, 29.011782667101848], 13);var googleSat = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',{maxZoom: 20,subdomains:['mt0','mt1','mt2','mt3']}).addTo(mymap);</script>
Mail goes, arrives in my mailbox, but there is no map, no images in the content. How do I overcome this?
any html content ( b - p - div) looks fine but not for map
Note: the mail content is empty, nothing comes up.
Leaflet is a JavaScript library. And email clients don't support JavaScript (mostly for security reasons). Your best bet is to send a image of your map in your email and add a link on it that redirects to a hosted page with your full page with Leaflet.