嘿傢伙即時嘗試創建一個重置密碼爲這個論壇即時開發...無論如何,我跟着一堆指南,並嘗試了許多版本,你會看到什麼,這是最少的錯誤。 ..我仍然無法弄清楚什麼是錯,我可以使用你的幫助。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端口 –