【问题标题】:Newsletter Html email时事通讯 Html 电子邮件
【发布时间】:2013-12-31 03:02:25
【问题描述】:

我准备了一份简报,其中包含一些编辑文本区域和一些默认文本。我的时事通讯的用户能够在文本区域中编辑文本,然后当他单击预览按钮时保存编辑的文本,在此页面中显示使用 PHP ($_POST[]) 编辑的所有文本。单击 SendNewsLetter 按钮时,会发送邮件,但其中没有任何文本,就像使用 PHP 显示文本一样。有没有其他方法可以在邮件正文中显示动态内容。提前感谢,请帮我解决这个问题。

以下是在电子邮件正文中不起作用的 php 代码。在预览中它显示正常。

<table cellspacing="0" cellpadding="0" border="1"  width="300px" height="auto" >
    <tr><td><?php echo set_value('input1',$_POST['input1']); ?></td></tr>
</table>

这是我的 sendemail()

public function newsemail(){
$this->load->library('email');
$config['mailtype'] = 'html';
$header = $this->load->view('index/news1','',true);
$this->email->initialize($config);
$this->email->from('info@xyz.net', 'xyz Consulting');
$this->email->reply_to('info@xyz.net','xyz Consulting');
$this->email->to('mahboob@gmail.com');
//$this->email->cc('mehboob029@gmail.com');
$this->email->bcc('xyz@gmail.com');
$this->email->subject('Newsletter');
$this->email->message( $header );
$mail = $this->email->send();

【问题讨论】:

  • 电子邮件脚本在哪里,HTML 邮件需要格外小心(Content-Type),你这样做了吗?
  • 请让我知道是否有任何替代方式不使用 php 将输入数据从一个文件发送到另一个文件。因为 php 在 html 电子邮件中被简单地忽略了。
  • 找到解决我的问题的方法,感谢您的时间。当我在邮件中加载它时,我没有向我的 news1 文件发送任何数据。 :-)

标签: php html


【解决方案1】:

这取决于你加载的库..

可以选择 HTML 内容或文本,或正文而不是消息。

查看你的视图函数。

【讨论】:

    猜你喜欢
    • 2011-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-05
    • 2014-06-26
    • 2013-08-29
    • 2012-07-23
    • 2013-06-19
    相关资源
    最近更新 更多