如何显示< iframe>标记为Gmail [英] How to display <iframe> tag to gmail

查看:101
本文介绍了如何显示< iframe>标记为Gmail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用codeigniter发送电子邮件...激活用户帐户后,它发送另一个电子邮件插入标签,但当用户收到消息,没有标签出现,但是当我尝试使用其他元素,或它呈现的样式,但如何不来?

I use codeigniter to send email... After activating the user account it sends another email to insert tag but when the user receives the message, no tag appeared but when I tried using other elements like or it renders the style but how come doesn't?

        $message = 'Congratulations! Use the script below to add your widget.<br>';
        $message .= "<iframe frameborder=\"0\" src=\"<?=base_url() ?>business/widget/{$id}\" height=\"320px;\" width=\"480px\" style=\"border: 1px solid #ccc;\"></iframe>";

        $this->email->message($message);    

        if($this->email->send())        
        { 
                         other code.... 
                    }


推荐答案

Gmail和许多其他电子邮件客户端对您可以在HTML电子邮件。

Gmail and many other email clients are very strict about what HTML you can use in your HTML emails.

< iframe> 严格限制,因为它可能会将用户暴露给他们没有期望,并且在另一端的网站可以记录关于用户的信息(例如他们的IP地址)。由于类似的原因,图片被屏蔽。

<iframe> is strictly off limits, because it could expose the user to a website which they were not expecting, and the website at the other end could record info about the user (such as their IP address). Images are blocked for similar reasons.

如果我是你,我会坚持使用超级基本的HTML和CSS。专注于获取消息给用户,并希望他们的客户端使消息看起来漂亮。始终提供链接以在其他地方查看完整的邮件。

If I were you, I'd stick to using super basic HTML and CSS. Focus on getting the message to the user and hope their client makes the message look pretty. Always offer a link to view the full message elsewhere.

这篇关于如何显示&lt; iframe&gt;标记为Gmail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆