【问题标题】:send email codeigniter 3 not working localhost use wamppserver发送电子邮件 codeigniter 3 不工作 localhost 使用 wamppserver
【发布时间】:2016-12-31 09:09:20
【问题描述】:
 $config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'smtp.googlemail.com',
    'smtp_port' => 587,
    'smtp_user' => 'example@gmail.com',
    'smtp_pass' => 'password',
    'mailtype'  => 'html', 
    'charset'   => 'iso-8859-1'
);

$this->email->from('example@gmail.com', 'easyfact');
$this->email->to('example@gmail.com');
$this->email->cc('example@gmail.com');
$this->email->bcc('example@gmail.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();

reulst 网站

 Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

我使用 wamppserver 帮助我

【问题讨论】:

    标签: email codeigniter-3


    【解决方案1】:

    您没有在任何地方使用$config 变量。打电话

    $this->email->initialize($config);
    

    这应该可以解决您的问题。

    另请参阅:Setting Email Preferences Codeigniter 电子邮件类文档的一部分。

    【讨论】:

    • 发送 AUTH LOGIN 命令失败。错误:530 5.7.0 必须先发出 STARTTLS 命令。 v1sm128263817pgv.33 - gsmtp 无法使用 PHP SMTP 发送电子邮件。您的服务器可能未配置为使用此方法发送邮件。
    猜你喜欢
    • 2014-07-22
    • 2013-09-06
    • 2017-10-21
    • 1970-01-01
    • 1970-01-01
    • 2017-12-07
    • 2019-03-06
    • 2015-04-09
    • 1970-01-01
    相关资源
    最近更新 更多