【发布时间】:2017-07-27 05:47:36
【问题描述】:
我的电子邮件模板中有以下代码:
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3022.6173606180814!2d-73.98784413488774!3d40.74844444332261!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c259a9aeb1c6b5%3A0x35b1cfbc89a6097f!2sEmpire+State+Building%2C+350+5th+Ave%2C+New+York%2C+NY+10118!5e0!3m2!1sen!2s!4v1488865918048" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
我使用 yiiMailer 向用户发送邮件,我的控制器中有以下代码:
$topic='Message';
$letter = $this->renderPartial('application.views.mail.email_temp',array('model'=>$model, 'topic'=>$topic, ''),true);
$message=$letter;
$mail = new YiiMailer('contact',array('message'=>$message));
$mail->setSubject('Message');
但是,当我打开发送的电子邮件时,它没有显示 Google 地图(已使用 Gmail 测试)。如何在我的电子邮件中显示 Google 地图?
【问题讨论】:
-
这已经被问过了:stackoverflow.com/questions/24355007/… 也可以在你没有添加 $mail->IsHtml(true);启用 html 电子邮件。