我正在使用 CodeIgniter 2.1.3 我正在使用 CodeIgniter 的邮件库来发送电子邮件。作为 CI 的官方文件。我用:
$this->load->library('email');
$this->email->from('info@mydomain.com', 'My Name');
$this->email->to('target@yahoo.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
当我使用 target(to) 电子邮件是 gmail 时,例如 target@gmail.com,一切正常,我可以收到来自 CI 的电子邮件。但是当我使用雅虎邮箱如target@yahoo.com时,目标邮箱收不到CI发送的邮件。
有什么建议吗?
PS:我检查了我的垃圾邮件文件夹,它是空的。这是 print_debugger() 方法的输出:
Your message has been successfully sent using the following protocol: mail
From: "Name"
Return-Path:
Reply-To: "info@mkvietnam.com"
X-Sender: info@mkvietnam.com
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <51b06367996d8@mkvietnam.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
=?utf-8?Q?Test_email?=
Email body