2009-10-08 6 views
0

을 smtp.mail.emea.microsoftonline.com에 연결 W2K 서버 2003PHPMailer의 문제는 실행중인 웹 서버에서 이메일을 보내려고 다음과 같은 오류를 받고 있어요

을 smtp.mail.emea.microsoftonline.com하기
SMTP -> FROM SERVER:220 smtp.mail.emea.microsoftonline.com Microsoft ESMTP MAIL Service ready at Thu, 8 Oct 2009 01:00:53 -0700 
SMTP -> FROM SERVER: 250-smtp.mail.emea.microsoftonline.com Hello [78.109.167.122] 250-SIZE 31457280 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-BINARYMIME 250 CHUNKING 
SMTP -> ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type 
SMTP -> FROM SERVER:250 2.0.0 Resetting 
SMTP Error: Could not authenticate. 

누구나 무엇이 잘못 될 수 있습니까? 나는하여도 php.ini 파일에서 설정 한 다음 한 : 또한

http://technet.microsoft.com/en-us/library/aa995718(EXCHG.65).aspx

을 : 전혀 연결할 수 있는지

[mail function] 
; For Win32 only. 
SMTP = smtp.mail.emea.microsoftonline.com 
smtp_port = 587 
; For Win32 only. 
sendmail_from = [email protected] 

require_once('class.phpmailer.php'); 

$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch 

$mail->IsSMTP(); // telling the class to use SMTP 

try { 
    $mail->Host  = "smtp.mail.emea.microsoftonline.com"; // SMTP server 
    $mail->SMTPDebug = 2;      // enables SMTP debug information (for testing) 
    $mail->SMTPAuth = true;     // enable SMTP authentication 
    //$mail->SMTPSecure = "ssl";     // sets the prefix to the servier 
    $mail->Port  = 587;     // set the SMTP port for the server 
    $mail->Username = "[email protected]"; // username 
    $mail->Password = "Password";   // password 
    $mail->AddReplyTo('[email protected]', 'First Last'); 
    $mail->AddAddress('[email protected]', 'John Doe'); 
    $mail->SetFrom('[email protected]', 'First Last'); 
    $mail->AddReplyTo('[email protected]', 'First Last'); 
    $mail->Subject = 'PHPMailer Test Subject via mail(), advanced'; 
    $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically 
    $mail->MsgHTML(file_get_contents('examples/contents.html')); 
    $mail->Send(); 
    echo "Message Sent OK</p>\n"; 
} catch (phpmailerException $e) { 
    echo $e->errorMessage(); //Pretty error messages from PHPMailer 
} catch (Exception $e) { 
    echo $e->getMessage(); //Boring error messages from anything else! 
} 
+0

로그에서 보면 인증 프로토콜이 누락 된 것처럼 보입니다. 시도해보십시오 http://stackoverflow.com/questions/16346490/phpmailer-cant-connect-to-smtp-server?rq=1? – scalopus

답변

0

나는 몇 달 전에 같은 문제가 발생했습니다. 그리고 SMTPSecure로 인한 오류는 ntlm을 사용합니다. 웹에서 전송 및 수신 할 수있는 메일 서버를 중계하는 것을 잊지 마십시오. 계정 이메일과 비밀번호를 다시 확인하십시오.