gpt4 book ai didi

php - CodeIgniter 不使用 SMTP 发送电子邮件

转载 作者:行者123 更新时间:2023-12-03 22:59:02 24 4
gpt4 key购买 nike

我正在使用我的域详细信息通过 CodeIgniter SMTP 发送电子邮件,但电子邮件无法发送。这是我的设置:

 $full_name =  'xxx';
$from = $email = '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3d54535b527d505c535c4758514e4d585e5451544e494e135e5250" rel="noreferrer noopener nofollow">[email protected]</a>';
$configs = Array(
'protocol' => 'smtp',
'smtp_host' => 'mail.manazelspecialists.ae',
'smtp_port' => 587,
'smtp_user' => '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4e3d3b3e3e213c3a0e232f202f342b223d3e2b2d272f22273d3a3d602f2b" rel="noreferrer noopener nofollow">[email protected]</a>',
'smtp_pass' => 'xxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);

$this->load->library('email', $configs);
$this->email->initialize($configs);

$msg = '<html><body>';
$msg.= 'msg here';
$msg.= '</body></html>';

$this->email->set_newline("\r\n");
$this->email->subject('Career Form Filled');
$this->email->from($from,$full_name);
$this->email->reply_to(REPLY_TO);
$this->email->to('<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8af2f2f2f2caede7ebe3e6a4e9e5e7" rel="noreferrer noopener nofollow">[email protected]</a>');
$this->email->message($msg);
$this->email->send();

并且我收到此错误:无法发送 AUTH LOGIN 命令。错误:无法使用 PHP SMTP 发送电子邮件。您的服务器可能未配置为使用此方法发送邮件。

最佳答案

更改配置数组中的一行并尝试

 $configs = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://mail.manazelspecialists.ae',//change here
'smtp_port' => 587,
'smtp_user' => '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6e1d1b1e1e011c1a2e030f000f140b021d1e0b0d070f02071d1a1d400f0b" rel="noreferrer noopener nofollow">[email protected]</a>',
'smtp_pass' => 'xxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);

关于php - CodeIgniter 不使用 SMTP 发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46687946/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com