php – codeigniter html电子邮件更改字符
我有电子邮件的问题,html是好的,但是当我打开它们时,文本中的错误和链接中的一些字符变为= =
Thanks for joining . your log=n details are here ma=e sure you keep them safe. To verify your email address,please follow this link: Finish your registration... Link doesn't work? Copy the following link to your browser address bar: http://www.myurl.com/dev=l/panel/auth/activate/123131/123131 Please verify your email within 123131 hours,otherwise your registration =ill become invalid and you will have to register again. 每个图像和链接甚至文本都是borken 这是config / email.php $config['email_notification']['protocol'] = 'smtp'; $config['email_notification']['smtp_host'] = 'smtp.live.com'; $config['email_notification']['smtp_user'] = 'xxxxx'; $config['email_notification']['smtp_pass'] = 'xxxxxxx'; $config['email_notification']['smtp_port'] = '587'; $config['email_notification']['mailtype'] = 'html'; $config['email_notification']['charset'] = 'utf-8'; $config['email_notification']['wordwrap'] = false; $config['email_notification']['smtp_crypto'] = 'tls'; 这是控制器 $this->load->library('email'); $this->email->initialize($this->config->item('email_notification')); $this->email->subject('Email Test'); $this->email->set_newline("rn"); $this->email->from('xxxxxx'); // change it to yours $this->email->to('xxxxx'); $this->email->subject('Email Test'); $data=array( 'site_name'=>'tralalalal','user_id'=>'123131','new_email_key'=>'123131','activation_period'=>'123131','email'=>'123131','title'=>'123131',); $this->email->message($this->load->view('email/activate_account/en',$data,true)); 电子邮件正文 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> /* Client-specific Styles */ #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */ body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */ body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */ /* Reset Styles */ body{margin:0; padding:0;} img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;} table td{border-collapse:collapse;} #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;} </style> </head> <body> 谢谢 解决方法
我找到了答案,所以如果有人有同样的问题
这就是为什么
这是您更改代码以覆盖此限制的位置 原单 protected function _prep_quoted_printable($str,$charlim = '') { // Set the character limit // Don't allow over 76,as that will make servers and MUAs barf // all over quoted-printable data if ($charlim == '' OR $charlim > '76') { $charlim = '76'; } 快速解决 :) protected function _prep_quoted_printable($str,as that will make servers and MUAs barf // all over quoted-printable data if ($charlim == '' OR $charlim > '76') { $charlim = '200'; } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |