php-发送的CodeIgniter奇怪的电子邮件

我有一个函数,可以传递参数以轻松发送电子邮件.

就是这个 :

function __construct() {
        $this -> CI = get_instance();
        $this -> CI -> load -> library('email');
    }

    public function send_one_email($single_email, $single_subject, $single_body, $single_attach) {
        $this -> CI -> email -> clear();
        $this -> CI -> email -> to($single_email);
        $this -> CI -> email -> from('**************');
        $this -> CI -> email -> subject($single_subject);
        $this -> CI -> email -> message($single_body);

        if ($single_attach) {
            $this -> CI -> email -> attachment($single_attach);
        }

        if ($this -> CI -> email -> send()) {
            return TRUE;
        }
    }

我收到的电子邮件是(我不应该收到):

?= =?utf-8?Q?2013?= Reply-To: “SUNYOrangeScholarInterface@gmail.com”
X-Sender:
SUNYOrangeScholarInterface@gmail.com X-Mailer: CodeIgniter X-Priority:
3 (normal) Message-ID: <520eb8d943533@gmail.com> Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=”B_ALT_520eb8d943598″

This is a multi-part message in MIME format. Your email application
may not support this format.

–B_ALT_520eb8d943598 Content-Type: text/plain; charset=utf-8 Content-transfer-encoding: 8bit

Hello Rixhers Ajazi this is an automated email to notify you that your
account has been successfully created.You must wait for your account
to be verified meaning that you do not have access to use
ScholarInterface. Once your account is activated and you are given a
user role you will be notified via email.Please be advised that since
you have created your account you are responsible for keeping your
credentials safe. These include your email account, your answers to
your security questions, and your password itself.I (Rixhers Ajazi)
just want to warn you that if you do not keep your security answers
safe then some one can take over your account.Any questions what so
ever with ScholarInterface please email Rixhers Ajazi at
CoderRix@gmail.comAny questions pertaining to your account please
notify your Administrators. Rixhers Ajazi is not a Administrator but a
Super User (the coder of this program).

–B_ALT_520eb8d943598 Content-Type: text/html; charset=utf-8 Content-transfer-encoding: quoted-printable

Hello Rixhers Ajazi this is an automated email to notify you that your
acco= unt has been successfully created.You must wait for your account
to be veri= fied meaning that you do not have access to use
ScholarInterface. On= ce your account is activated and you are
given a user role you will be noti= fied via email.Please be advised
that since you have created your account y= ou are responsible for
keeping your credentials safe. These include your em= ail account,
your answers to your security questions, and your password its= elf.I
(Rixhers Ajazi) just want to warn you that if you do not keep your se=
curity answers safe then some one can take over your account.Any
questions = what so ever with ScholarInterface please email
Rixhers Ajazi at Cod= erRix@gmail.comAny questions pertaining to your
account please notify your = Administrators. Rixhers Ajazi is not a
Administrator but a Super User (the = coder of this program).

–B_ALT_520eb8d943598–

这是地狱吗?

这是我在email.PHP中的配置:

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

 $config['protocol'] = 'smtp';
 $config['smtp_host'] = 'ssl://smtp.googlemail.com';
 $config['smtp_user'] = '********************@gmail.com';
 $config['smtp_pass'] = '**************************';
 $config['smtp_port'] = 465;
 $config['smtp_timeout'] = 30;
 $config['charset'] = 'utf-8';
 $config['crlf'] = "\r\n";
 $config['newline'] = "\r\n";
 $config['wordwrap'] = TRUE;
 $config['mailtype'] = 'html';

我在另一个应用程序中使用了相同的脚本,但我从未得到过.任何帮助都会很棒.

解决方法:

电子邮件顶部的消息似乎是从主题标头开始的,因此我想这将是开始调试的好地方.

曾经有一个issue caused by Subject lines with more than 75 chars.

如果上述修复方法无效,则开发人员已修补Email.PHP解决此问题:

https://github.com/EllisLab/CodeIgniter/issues/1409#issuecomment-9330713

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...