用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2362|回复: 3
收起左侧

[讨论/交流] 在网站中怎么用QQ邮箱发邮件?

[复制链接]
发表于 2015-3-17 00:34:20 | 显示全部楼层 |阅读模式
在网站中怎么用QQ邮箱发邮件?
php代码
                $this->load->library('email');

$this->email->from('xxxxx@qq.com');
$this->email->to('xxxxxx@qq.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();


php.ini  的配置如下
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.qq.com
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =



发送后提示成功但是收不到
Your message has been successfully sent using the following protocol: mail






发表于 2015-3-17 09:17:28 | 显示全部楼层
发表于 2015-3-17 10:36:49 | 显示全部楼层
用PHP的类就可以啦
 楼主| 发表于 2015-3-18 21:30:53 | 显示全部楼层
可以用了,是我邮箱没开启smtp

本版积分规则