duai1683 2013-05-16 16:05 采纳率: 0%
浏览 38

如何使用codeigniter获取电子邮件的标题?

I have email function in codeigniter like this

            $this->email->attach('file.txt');
            $this->email->from('messi6@barcelona.com', 'leo messi');
            $this->email->to("messifan@gmail.com"); 
            $this->email->subject('Messi fan');
            $msg = $this->load->view('messi_the_best','',TRUE);
            $this->email->message($msg);    
            $this->email->send();

This is working fine.Now i moved this to new server(both mail server and web server).my new mail server only support ntlm authentication. so codeigniter email class not support ntlm authentication. so i added this class to library. but this class not support attach file. Now i want to get header part of email from codeigniter email class. and pass this header of email to my new class to send email.

  • 写回答

1条回答

  • dongxing4643 2013-05-16 21:27
    关注

    You can achieve this by extending CodeIgniters Email class

    <?php
    
    class MY_Email extends CI_Email{
    
      public function get_header_str()
      {
        return $this->_header_str;
      }
    
    }
    
    ?>
    
    评论

报告相同问题?