我使用composer安装了一个新的laravel 5.3副本,但我一直收到这个错误:
唯一支持的密码是AES-128-CBC和AES-256-CBC,密钥长度正确.即使我在config目录中的app.php文件指定
'cipher'=>'AES-128-CBC',
我一直在尝试使用PHPMailer从我的本地主机发送电子邮件,但我无法修复此错误
SMTP connect()失败.
我知道有这种错误的建议,但我试过的似乎对我有用.这是我的设置
$mail = new PHPMailer();
$mail->IsSMTP(); // we are going to use SMTP
$mail->Host = 'smtp.gmail.com'; // setting GMail as our SMTP server
$mail->SMTPAuth = true; // enabled SMTP authentication
$mail->Username = 'mygamil'; // user email address
$mail->Password = "mypassword"; // password in GMail
$mail->SMTPSecure = "tls"; // prefix for secure protocol to connect to the server
$mail->SetFrom($this->session->userdata('email'), $this->session->userdata('username')); //Who is sending the email
$mail->AddReplyTo("someone@domain.com",$this->session->userdata('username')); //email address that receives the response
$mail->Subject = $subject;
$mail->Body = $message; …Run Code Online (Sandbox Code Playgroud)