ylnxtfl 发表于 2015-3-17 00:34:20

在网站中怎么用QQ邮箱发邮件?

在网站中怎么用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的配置如下

; 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






Closer 发表于 2015-3-17 09:17:28

參考 CI 社區 - 使用CI Mail类发送邮件实例 (QQ , mailgun)

gxcnvip 发表于 2015-3-17 10:36:49

用PHP的类就可以啦

ylnxtfl 发表于 2015-3-18 21:30:53

可以用了,是我邮箱没开启smtp
页: [1]
查看完整版本: 在网站中怎么用QQ邮箱发邮件?