How to display an image in email in codeigniter

后端 未结 1 895
半阙折子戏
半阙折子戏 2021-01-27 17:49

Controller

public function index(){
     send_mail(\'New Volunteer Form received\', $this->load->view(\'site/email/volunteer\', NULL, TRUE         


        
1条回答
  •  花落未央
    2021-01-27 18:03

    Try this

    $this->email->attach('/path/to/photo1.jpg', 'inline');
    

    or

    $message = 'Photo';
    $message .= '';
    $message .= '" height="100" width="150">';
    $message .= '';
    

    To use the default disposition (attachment), leave the second parameter blank, otherwise use a custom disposition

    0 讨论(0)
提交回复
热议问题