dpsx99068 2013-05-20 07:19
浏览 19

时事通讯Html电子邮件

I have prepared a newsletter with some edit textareas and some default text in it. User of my newsletter is able to edit text in text area, after which am saving the edited text when he clicks on preview button, In this page am showing all the text edited using PHP ($_POST[]). when SendNewsLetter button is clicked mail is sent but without any text in it, as am using PHP to display text. Is there any alternate way to display dynamic content in mail body. Thank in advance, Please help me out of this.

Below is the php code which is not working in email body. In preview it displays fine.

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

This is my 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();
  • 写回答

1条回答 默认 最新

  • dongtu1789 2013-05-20 11:24
    关注

    Its depends on you loaded library..

    there is option for HTML content or text, or body rather than message.

    look into you view function.

    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口