yuanxing008 发表于 2016-7-7 11:28:50

Email类发送邮件失败,求助

这是控制器代码://以下设置Email参数
                $this->load->library('Email');
                $config['smtp_host'] = 'smtpdm.aliyun.com';
                $config['smtp_user'] = 'Xxxxxx .com';
                $config['smtp_pass'] = 'xxxxxx';
                $config['smtp_port'] = '25';
                $config['protocol'] = 'smtp';
                $config['charset'] = 'utf-8';
                //$config['wordwrap'] = TRUE;
                $config['mailtype'] = 'html';
                $config['send_multipart'] = FALSE;

                $this->email->initialize($config);                        
         //加载CI的email类
                //以下设置Email内容
                $this->email->from('xxxxxx.com');
                $this->email->to('xxxxxxxxxx@qq.com');
                $this->email->subject('Email Test');
                $this->email->message('<font color=red>Testing the email class.</font>');
                $this->email->send();

                echo $this->email->print_debugger();                //返回包含邮件内容的字符串,包括EMAIL头和EMAIL正文。用于调试。
               
               


报错信息是:
220 smtp.aliyun-inc.com MX AliMail Server(127.0.0.1)
hello: The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniterDate: Thu, 7 Jul 2016 05:21:14 +0200From: <xxxxxxxx.com>Return-Path: <xxxxxxxxxx.com>To: xxxxxxxxx@qq.comSubject: =?utf-8?Q?=45=6D=61=69=6C=20=54=65=73=74?=Reply-To: <xxxxxxxxxxxx.com>X-Sender: xxxxxxxxxx.comX-Mailer: CodeIgniterX-Priority: 3 (Normal)Message-ID: <577dcaaa6035c@send.weicewang.com>Mime-Version: 1.0Content-Type: text/html; charset=utf-8Content-Transfer-Encoding: quoted-printable=3Cfont color=3Dred=3ETesting the email class.=3C/font=3E


敏感信息隐藏了,跟这个应该是无关的,因为同样的配置用phpEmailer正常发送。求助啊该怎么解决这个问题

Hex 发表于 2016-7-8 15:33:15

改用 phpmailer。。。我就是用的 phpmailer
页: [1]
查看完整版本: Email类发送邮件失败,求助