小编FOP*_*FOP的帖子

PhpMailer不发送邮件 - TLS错误?

我在使用phpmailer发送电子邮件时遇到问题.

发送电子邮件的代码是:

$mail_User      = "site@xxxxxxx.com";
$mail_Password  = "My Password";
$mail_address   = "site@xxxxxxx.com";
$mail_Name      = "MyName";
$mail_Server    = "222.222.222.222";
$mail_Port      = 25;

    function SendHTMLMail($to, $cc, $bcc, $subject, $body)
    {
        global $mail_User, $mail_Password, $mail_address, $mail_Name, $mail_Server, $mail_Port;
        $correo = new PHPMailer;
        $correo->SMTPDebug = 3;                               // Enable verbose debug output
        $correo->SetLanguage("es", "/phpmailer/language/");
        $correo->IsSMTP();

        $correo->IsHTML(true);
        $correo->Host = $mail_Server;
        $correo->Port = $mail_Port;
        $correo->SMTPAuth =true;
        //$correo->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
        $correo->Username = $mail_User;
        $correo->Password = $mail_Password;
        $correo->From      = $mail_address;
        $correo->FromName  = …
Run Code Online (Sandbox Code Playgroud)

php email phpmailer

6
推荐指数
1
解决办法
4466
查看次数

标签 统计

email ×1

php ×1

phpmailer ×1