嘿伙计,我正在尝试使用codeiginiter邮件类功能发送电子邮件,但我发现smtp协议有问题.我使用gmail smtp协议.我在本地机器上运行它.我正在使用Xampp 1.7.4软件包,我尝试过如下设置:
function index()
{
$config['protocol'] = 'smtp'; // mail, sendmail, or smtp The mail sending protocol.
$config['smtp_host'] = 'smtp.gmail.com'; // SMTP Server Address.
$config['smtp_user'] = 'me@gmail.com'; // SMTP Username.
$config['smtp_pass'] = '123'; // SMTP Password.
$config['smtp_port'] = '25'; // SMTP Port.
$config['smtp_timeout'] = '5'; // SMTP Timeout (in seconds).
$config['wordwrap'] = TRUE; // TRUE or FALSE (boolean) Enable word-wrap.
$config['wrapchars'] = 76; // Character count to wrap at.
$config['mailtype'] = 'html'; // text or html Type of mail. …Run Code Online (Sandbox Code Playgroud)