我使用以下代码用于雅虎并且它不起作用,你能帮助我做错了吗?当我使用主机作为smtp的gmail时,相同的代码运行良好。我正在尝试使用yahoo,AOL,windows hotmail从本地服务器发送电子邮件。以下是在application / config文件夹中创建的文件,名称为email.php
$config['protocol'] = "smtp";
$config['smtp_host'] = "ssl://smtp.mail.yahoo.com";
$config['smtp_user'] = "myusername@yahoo.com";
$config['smtp_pass'] = "**************";
$config['smtp_port'] = "465";
$config['charset']="utf-8";
$config['newline']="\r";
$config['crlf'] = "\r";
gmail的工作代码
$config['protocol'] = "smtp";
$config['smtp_host'] = "ssl://smtp.gmail.com";
$config['smtp_user'] = "username@gmail.com";
$config['smtp_pass'] = "*****";
$config['smtp_port'] = '465';
$config['charset']='utf-8';
$config['newline']="\r\n";
$config['crlf'] = "\r\n";