嘿家伙即时尝试创建一个重置密码为这个论坛即时开发...无论如何,我跟着一堆指南,并尝试了许多版本,你会看到什么,这是最少的错误。 ..我仍然无法弄清楚什么是错,我可以使用你的帮助。Codeigniter发送SMTP邮件
class CI_Email { //in library email.php
var $useragent = "CodeIgniter";
var $mailpath = "/usr/sbin/msmtp"; // Sendmail path
var $protocol = "smtp"; // mail/sendmail/smtp
var $smtp_host = "smtp.googlemail.com"; // SMTP Server.
var $smtp_user = "[email protected]"; // SMTP Username
var $smtp_pass = "mypass"; // SMTP Password
var $smtp_port = "465"; // SMTP Port
var $smtp_timeout = 5; // SMTP Timeout in seconds
var $smtp_crypto = ""; // SMTP Encryption. Can be null, tls or ssl.
var $mailtype = "html"; // text/html Defines email formatting
var $charset = "utf-8"; // Default char set: iso-8859-1 or us-ascii
这是结果:
hello: The following SMTP error was encountered: Failed to send AUTH LOGIN command. Error: from: The following SMTP error was encountered: to: The following SMTP error was encountered: data: The following SMTP error was encountered:The following SMTP error was encountered: Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method. Content-Type: multipart/alternative; boundary="B_ALT_51cd96f2daf24"
This is a multi-part message in MIME format. Your email application may not support this format.
--B_ALT_51cd96f2daf24 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit
My text here...
--B_ALT_51cd96f2daf24 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
我也尝试了很多其他配置的我在网上找到,如:
var $mailpath = "/usr/sbin/sendmail"; // Sendmail path
var $smtp_host = "ssl://smtp.googlemail.com"; // SMTP Server.
或:
var $mailpath = "/usr/sbin/sendmail"; // Sendmail path
var $smtp_host = "ssl://smtp.gmail.com"; // SMTP Server.
使用SSL协议在smtp_host我越来越无尽的错误无尽的屏幕。
您正在使用什么SMTP端口? –
我使用我发现的指南建议的465端口...即时通讯相当新的东西是有另一个文件,我必须配置端口? – Dennis
你可以接受这两个: var $ smtp_host =“ssl://smtp.googlemail.com”; // SMTP服务器 var $ smtp_port =“25”; // SMTP端口 –