电子邮件主题缩短CodeIgniter [英] Email subject shortened in CodeIgniter
本文介绍了电子邮件主题缩短CodeIgniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经发送了CodeIgniter的电子邮件,但是我不知道为什么我的电子邮件被截断,或者它被包含在黑色钻石中,并带有一个问号。这是真的我使用波斯字符,但标题是utf-8反正。以下是发送电子邮件的CodeIgniter代码:
I have sent an email from CodeIgniter but I don't know why my email get's truncated or it gets included with black diamonds with a question mark in them. It is true I use Persian character but the header is utf-8 anyway. Here is the CodeIgniter Code to send email:
只需注意主题中的非拉丁字符:
Just pay attention to the non-latin characters in the subject:
$configs = array(
'protocol'=>'smtp',
'wrapchars'=>150,
'smtp_host'=>'ssl://smtp.gmail.com',
'smtp_user'=>'cgmaster.iran@gmail.com',
'smtp_pass'=>"09357758934",
'smtp_port'=>'465',
'mailtype'=>'html'
);
$this->load->library("email", $configs);
$this->email->set_newline("\r\n");
$this->email->to("mostafatalebi@rocketmail.com");
$this->email->from("cgmaster.iran@gmail.com", wraptitle("", true, "email_from"));
$this->email->subject("رمز عبو::نیازر");
$this->email->message("Let's user CodeIgniter since it is really powerful.");
$this->email->send();
推荐答案
utf-8
支持波斯字符。但是我以前有同样的问题,您必须在
$ config数组
中明确指出 charset
到utf-8。
utf-8
supports Persian characters. But I had the same problem before, you have to explicitly state the charset
to utf-8 in $config array
.
这篇关于电子邮件主题缩短CodeIgniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文