如何使用外部URL在内部电子邮件正文中显示网页

问题描述 投票:-1回答:1

我需要在电子邮件中显示网页(不是在电子邮件中发送页面的html),如iframe,(不在电子邮件中工作)。

如果我使用file_get_contents不能正常工作(显示css问题)(两者都不在电子邮件中)。

根据我的研究/知识,我没有找到任何可能的方法,但是有任何黑客攻击可能会使这种情况发生。

请帮帮我。

php html email iframe file-get-contents
1个回答
2
投票

iframes / JavaScript经常被电子邮件客户端阻止(因为您可能已经研究过并发现过)

可能伪造电子邮件内部网页的一件事是带有地图标记的图像。电子邮件客户端中对地图标签的支持并不完美,但您可以使其中一些使用真正基本的代码。

<!DOCTYPE html>
<html>
<body>
<table><tr><td>
<img src="http://www.emailonacid.com/images/blog_images/Emailology/2017/2017_imagemap/shapes.jpg" usemap="#image-map" width="600">
<map name="image-map">
    <area target="new" alt="Square" title="Rectangle" href="https://www.google.com/#q=rectangle" coords="30,29,306,153" shape="rect">
    <area target="new" alt="Triangle" title="Triangle" href="https://www.google.com/#q=triangle" coords="323,267,572,26,571,267" shape="poly">
</map>
</td></tr></table>
<hr>
<img src="https://www.w3schools.com/tags/planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
  <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
  <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
</body>
</html>

我不完全确定你不能在电子邮件中加载网站,但我相信即使你这样做也无法正常工作。

因此,如果这种方法可以保存你的皮肤,尝试制作一个~600px宽的网站截图,上传到https://www.image-map.net/或任何其他工具,并开始映射:)

© www.soinside.com 2019 - 2024. All rights reserved.