此代码在本地工作得很好。但是当我把它放在我的VPS上时它不起作用。有人可以解释一下为什么吗?
$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
//Encoding da base de dados
$mail->Encoding = "base64";
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = 'login';
$mail->SMTPSecure = 'ssl';
$mail->Host = 'something.domain.com';
$mail->Port = 465;
$mail->Username = 'myusername@domain.com';
$mail->Password = '*mypass*';
$mail->SetFrom('somename@domain.com', 'Myname');
$mail->Subject = 'Email de teste';
$mail->Body = 'The content';
$mail->AddAddress('destination@server.com');
$mail->Send();