phpmailer中允许有多少个字符

phpmailer中允许有多少个字符,php,codeigniter,email,phpmailer,html-email,Php,Codeigniter,Email,Phpmailer,Html Email,我在CodeIgniter中使用电子邮件功能,当我设置“mailtype=html” 我不能发送长文本,但当我设置“mailtype=text”时,我可以发送长文本的电子邮件。我不知道为什么 我想用“emailtype=html”发送电子邮件,因为我想在邮件中使用粗体、斜体等 这是我的背景 $config = array( 'protocol' => 'smtp', 'smtp_host'=> 'my IP address', 'smtp_port' =>

我在CodeIgniter中使用电子邮件功能,当我设置“mailtype=html” 我不能发送长文本,但当我设置“mailtype=text”时,我可以发送长文本的电子邮件。我不知道为什么

我想用
“emailtype=html”
发送电子邮件,因为我想在邮件中使用粗体、斜体等

这是我的背景

$config = array(
    'protocol' => 'smtp',
    'smtp_host'=> 'my IP address',
    'smtp_port' => '25',
    'smtp_user' => 'my email address',
    'mailtype' => 'text',
    'charset' => '465',
    'wordwrap' => 'TRUE'
 );

$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('helpdesk@acc.co.id','ITCareHelpdesk ACC');
$this->email->to('dpalevi@gmail.com');
$this->email->subject('[ITCARE] Reminder Request Approval ITCare ACC');
$this->email->message('');

当我的
“mailtype=text”
检查邮件时,我尝试在邮件中使用lorem ipsum,我可以发送电子邮件,但当我使用
“mailtype=html”
时,我无法发送邮件

第一件事是你没有使用它。你在使用函数

$config = array(
    'protocol' => 'smtp',
    'smtp_host'=> '172.16.5.20',
    'smtp_port' => '25',
    'smtp_user' => 'helpdesk@acc.co.id',
    'mailtype' => 'html',
    'charset' => 'iso-8859-1', # can use utf-8 as well
    'wordwrap' => 'TRUE'
 );

确保您的端口可以使用
telnet

telnet smtp.domain.com 25

Q-phpmailer中允许多少个字符

A-据我所知,SMTP邮件中没有限制

请将我的代码添加到@AbdullaNilam
'charset'=>'465'
?那完全没有道理!你需要定义什么地方出了问题,你的代码看起来很不完整。我尝试了一下,仍然无法发送我的消息,我检查了我的端口,我的端口没有使用telnet@AbdullaNilamI检查一下,我的端口正常工作,我仍然不知道为什么当我的“mailtype=html”更改为“emailtype=text”我的邮件是用gmail smtp发送@AbdullaNilamtest。我从来没有遇到过这种问题。最后我仍然使用“mailtype”=>“text”,我在文档codeigniter中读到,如果我想使用“mailtype”=>“html”,我必须将其作为一个完整的网页发送,我尝试创建它,但仍然无法工作。谢谢你的帮助@AbdullaNilam