我尝试使用php邮件发送邮件,邮件发送完美,但主题是这样的
=??Q?=54=65=6C=6C=2D=55=53=20=59=6F=75=72=20=53=74=6F=72=79?=
这是我的邮件内容控制器。
$this->load->library('email');
$name="*****";
$email="*******@gmail.com";
$subject = 'Tell-US Your Story';
$message = '<ul style="list-style-type:none;">
<li><p><b>Name:</b>$nbsp;'.$name.'</p></li>
<li><p><b>Email:</b>'.$email.'</p></li>
</ul>';
// <title>' .$subject. '</title>
// Get full html:
$body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=' . strtolower(config_item('charset')) . '" />
<title>test mail</title>
<style type="text/css">
body {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 16px;
}
</style>
</head>
<body>
<div>
<h2>'.$subject.'</h2>
' . $message . '</<div>
</body>
</html>';
// Also, for getting full html you may use the following internal method:
//$body = $this->email->full_html($subject, $message);
$result =
$this->email
->from('*******@example.in')
->reply_to('') // Optional, an account where a human being reads.
->to('********@gmail.com')
->subject("Tell-US")
->message($body)
->send();
var_dump($result);
echo '<br />';
echo $this->email->print_debugger();
有人请帮我解决这个问题。
感谢你