首页 > 解决方案 > 从 php codeigniter 发送的电子邮件无法在特定域上接收

问题描述

在身份验证中,我已经重置密码,我有以下代码使用 php codeigniter 发送电子邮件。

/*********** other code *************/
$this->load->library('email');
$this->email->set_newline("\r\n");
$this->email->from('xyz@myexpdomain.com', 'HRMS');
$this->email->to($to);
$this->email->subject('Reset Password');
$this->email->message($message);
$this->email->send();
/*********** other code *************/

.htaccess

<IfModule mod_env.c>
SetEnv CI_ENV production
</IfModule>

因此在application/config/production/email.php

$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'xyz@myexpdomain.com',
'smtp_pass' => '********',
'mailtype'  => 'html', 
'charset'   => 'iso-8859-1'
);

工作正常但是。我们有另一个域,并为另一个域创建了 Gsuite 关联电子邮件"myexp2domain.com"。当我们使用这些电子邮件 ID ( $to) 时,收件箱/垃圾邮件中不会收到电子邮件。

如果电子邮件 ID 来自 Gmail、youmail 等,我们能够接收电子邮件。

我无法想象可能是什么原因,请您给我建议。

标签: phpcodeignitersmtpphpmailer

解决方案


推荐阅读