我的电子邮件有问题,html 没问题,但是当我打开它们时,文本和链接中有错误,其中一些字符更改为 = like
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.
每个图像和链接甚至文本都被破坏了我在想它与{unwrap}有关但没有帮助
这是 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("\r\n");
$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>
谢谢